Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] #102108 - Remove obscure TCA [types][bitmask_*] settings #796

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions Documentation/Types/Properties/BitmaskExcludelistBits.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
.. include:: /Includes.rst.txt
.. _types-properties-bitmask-excludelist-bits:
:orphan:

.. include:: /Includes.rst.txt
.. _types-properties-bitmask-excludelist-bits:

==========================
bitmask\_excludelist\_bits
==========================

.. confval:: bitmask_excludelist_bits

:Path: $GLOBALS['TCA'][$table]['types'][$type]
:type: array


See :ref:`bitmask\_value\_field <types-properties-bitmask-value-field>`.
.. versionchanged:: 13.0
This setting has been removed, it is not considered anymore when rendering
records in the backend record editing interface.

Syntax:
"[+/-][bit-number]" => "[comma-separated list of fields (from the main types-config) excluded]"
In case, extensions still use this setting, they should switch to casual
:php:`$GLOBALS['TCA']['someTable']['ctrl']['type']` fields instead, which
can be powered by columns based on string values.
47 changes: 10 additions & 37 deletions Documentation/Types/Properties/BitmaskValueField.rst
Original file line number Diff line number Diff line change
@@ -1,43 +1,16 @@
.. include:: /Includes.rst.txt
.. _types-properties-bitmask-value-field:
:orphan:

.. include:: /Includes.rst.txt
.. _types-properties-bitmask-value-field:

=====================
bitmask\_value\_field
=====================

.. confval:: bitmask_value_field

:Path: $GLOBALS['TCA'][$table]['types'][$type]
:type: string (field name)


Field name, which holds a value being the integer (bit-mask) for the 'bitmask\_excludelist\_bits' array.

It works much like 'subtype\_value\_field' but excludes fields based on whether a bit from the value field is set.
See property :ref:`bitmask\_excludelist\_bits <types-properties-bitmask-excludelist-bits>`.

These two properties are rarely used, but pretty powerful if a 'type=radio' or 'type=check' field
is set as bitmask\_value\_field.

[+/-] indicates whether the bit [bit-number] is set or not.

Example
=======

.. code-block:: php

'types' => [
'aType' => [
'showitem' => 'aField, anotherField, yetAnotherField',
'bitmask_value_field' => 'theSubtypeValueField',
'bitmask_excludelist_bits' => [
'-1' => 'anotherField', // Remove if bit 1 is NOT set
'+2' => 'yetAnotherField', // Remove if bit 2 is set
],
],
],
.. versionchanged:: 13.0
This setting has been removed, it is not considered anymore when rendering
records in the backend record editing interface.

With the above configuration, if field database "theSubtypeValueField" is set to value 5 (binary representation
"1 0 1"), the fields "anotherField" (-1 = 0 at bit position 1) and "yetAnotherField" (+2 = 1 at bit position 2)
are not displayed, thus leaving only field "aField". If the value is 1 (binary representation "0 0 1"), fields
"aField" and "yetAnotherField" are shown, while "anotherField" is not.
In case, extensions still use this setting, they should switch to casual
:php:`$GLOBALS['TCA']['someTable']['ctrl']['type']` fields instead, which
can be powered by columns based on string values.
17 changes: 7 additions & 10 deletions Documentation/Types/Properties/Index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
.. include:: /Includes.rst.txt
.. include:: /Includes.rst.txt

==========
Properties
==========


.. toctree::

BitmaskExcludelistBits
BitmaskValueField
ColumnsOverrides
Showitem
SubtypeValueField
SubtypesAddlist
SubtypesExcludelist
.. toctree::

ColumnsOverrides
Showitem
SubtypeValueField
SubtypesAddlist
SubtypesExcludelist
Loading