src/Contao/View/Contao2BackendView/TreePicker.php
private function handleInputNameForEditAll()
    {
        if (('select' !== $this->getEnvironment()->getInputProvider()->getParameter('act'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('select'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('mode'))
        ) {
            return;
        }

        $tableName      = \explode('____', $this->getEnvironment()->getInputProvider()->getValue('name'))[0];
        $sessionKey     = 'DC_GENERAL_' . \strtoupper($tableName);
        $sessionStorage =
            System::getContainer()->get('cca.dc-general.session_factory')->createService()->setScope($sessionKey);

        $selectAction = $this->getEnvironment()->getInputProvider()->getParameter('select');

        $session = $sessionStorage->get($tableName . '.' . $selectAction);

        $originalPropertyName = null;
        foreach ((array) $session['models'] as $modelId) {
            if (null !== $originalPropertyName) {
                break;
            }

            $propertyNamePrefix = \str_replace('::', '____', $modelId) . '_';
            if (0 !== strpos($this->strName, $propertyNamePrefix)) {
                continue;
            }

            $originalPropertyName = \substr($this->strName, \strlen($propertyNamePrefix));
        }

        if (!$originalPropertyName) {
            return;
        }

        $this->arrConfiguration['originalField'] = $originalPropertyName;

        $this->strName = $propertyNamePrefix . '[' . $originalPropertyName . ']';
    }
private function handleInputNameForEditAll()
    {
        if (('select' !== $this->getEnvironment()->getInputProvider()->getParameter('act'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('select'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('mode'))
        ) {
            return;
        }

        $tableName      = \explode('____', $this->getEnvironment()->getInputProvider()->getValue('name'))[0];
        $sessionKey     = 'DC_GENERAL_' . \strtoupper($tableName);
        $sessionStorage =
            System::getContainer()->get('cca.dc-general.session_factory')->createService()->setScope($sessionKey);

        $selectAction = $this->getEnvironment()->getInputProvider()->getParameter('select');

        $session = $sessionStorage->get($tableName . '.' . $selectAction);

        $originalPropertyName = null;
        foreach ((array) $session['models'] as $modelId) {
            if (null !== $originalPropertyName) {
                break;
            }

            $propertyNamePrefix = \str_replace('::', '____', $modelId) . '_';
            if (0 !== strpos($this->strName, $propertyNamePrefix)) {
                continue;
            }

            $originalPropertyName = \substr($this->strName, \strlen($propertyNamePrefix));
        }

        if (!$originalPropertyName) {
            return;
        }

        $this->arrConfiguration['originalField'] = $originalPropertyName;

        $this->strName = $propertyNamePrefix . '[' . $originalPropertyName . ']';
    }
private function handleInputNameForEditAll ( ) { if ( ( 'select' !== $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getParameter ( 'act' ) ) && ( 'edit' !== $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getParameter ( 'select' ) ) && ( 'edit' !== $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getParameter ( 'mode' ) ) ) { return ; } $ tableName = \ explode ( '____' , $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getValue ( 'name' ) ) [ 0 ] ; $ sessionKey = 'DC_GENERAL_' . \ strtoupper ( $ tableName ) ; $ sessionStorage = System :: getContainer ( ) -> get ( 'cca.dc-general.session_factory' ) -> createService ( ) -> setScope ( $ sessionKey ) ; $ selectAction = $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getParameter ( 'select' ) ; $ session = $ sessionStorage -> get ( $ tableName . '.' . $ selectAction ) ; $ originalPropertyName = null ; foreach ( ( array ) $ session [ 'models' ] as $ modelId ) { if ( null !== $ originalPropertyName ) { break ; } $ propertyNamePrefix = \ str_replace ( '::' , '____' , $ modelId ) . '_' ; if ( 0 !== strpos ( $ this -> strName , $ propertyNamePrefix ) ) { continue ; } $ originalPropertyName = \ substr ( $ this -> strName , \ strlen ( $ propertyNamePrefix ) ) ; } if ( ! $ originalPropertyName ) { return ; } $ this -> arrConfiguration [ 'originalField' ] = $ originalPropertyName ; $ this -> strName = $ propertyNamePrefix . '[' . $ originalPropertyName . ']' ; }
Handle the input name for edit all mode.

@return void
Handle the input name for edit all mode .