src/Contao/View/Contao2BackendView/ContaoWidgetManager.php
protected function getUniqueId($propertyName)
    {
        $inputProvider  = $this->getEnvironment()->getInputProvider();
        $sessionStorage = $this->getEnvironment()->getSessionStorage();

        $selector = 'ctrl_' . $propertyName;

        if (('select' !== $inputProvider->getParameter('act'))
            || (false === $inputProvider->hasValue('edit') && false === $inputProvider->hasValue('edit_save'))
        ) {
            return $selector;
        }

        $modelId = ModelId::fromModel($this->model);
        $fields  = $sessionStorage->get($modelId->getDataProviderName() . '.edit')['properties'];

        $fieldId = new ModelId('property.' . $modelId->getDataProviderName(), $propertyName);
        if (!\in_array($fieldId->getSerialized(), $fields)) {
            return $selector;
        }

        $selector = 'ctrl_' . \str_replace('::', '____', $modelId->getSerialized()) . '_' . $propertyName;

        return $selector;
    }
protected function getUniqueId($propertyName)
    {
        $inputProvider  = $this->getEnvironment()->getInputProvider();
        $sessionStorage = $this->getEnvironment()->getSessionStorage();

        $selector = 'ctrl_' . $propertyName;

        if (('select' !== $inputProvider->getParameter('act'))
            || (false === $inputProvider->hasValue('edit') && false === $inputProvider->hasValue('edit_save'))
        ) {
            return $selector;
        }

        $modelId = ModelId::fromModel($this->model);
        $fields  = $sessionStorage->get($modelId->getDataProviderName() . '.edit')['properties'];

        $fieldId = new ModelId('property.' . $modelId->getDataProviderName(), $propertyName);
        if (!\in_array($fieldId->getSerialized(), $fields)) {
            return $selector;
        }

        $selector = 'ctrl_' . \str_replace('::', '____', $modelId->getSerialized()) . '_' . $propertyName;

        return $selector;
    }
protected function getUniqueId ( $ propertyName ) { $ inputProvider = $ this -> getEnvironment ( ) -> getInputProvider ( ) ; $ sessionStorage = $ this -> getEnvironment ( ) -> getSessionStorage ( ) ; $ selector = 'ctrl_' . $ propertyName ; if ( ( 'select' !== $ inputProvider -> getParameter ( 'act' ) ) || ( false === $ inputProvider -> hasValue ( 'edit' ) && false === $ inputProvider -> hasValue ( 'edit_save' ) ) ) { return $ selector ; } $ modelId = ModelId :: fromModel ( $ this -> model ) ; $ fields = $ sessionStorage -> get ( $ modelId -> getDataProviderName ( ) . '.edit' ) [ 'properties' ] ; $ fieldId = new ModelId ( 'property.' . $ modelId -> getDataProviderName ( ) , $ propertyName ) ; if ( ! \ in_array ( $ fieldId -> getSerialized ( ) , $ fields ) ) { return $ selector ; } $ selector = 'ctrl_' . \ str_replace ( '::' , '____' , $ modelId -> getSerialized ( ) ) . '_' . $ propertyName ; return $ selector ; }
Get the unique id.

@param string $propertyName The property name.

@return string
Get the unique id .