src/Contao/View/Contao2BackendView/Widget/FileTree.php
private function setUp()
    {
        // Load the fonts for the drag hint (see #4838)
        $GLOBALS['TL_CONFIG']['loadGoogleFonts'] = true;

        $this->rootDir = \dirname(System::getContainer()->getParameter('kernel.root_dir'));

        if (!$this->dataContainer || !$this->orderField) {
            return;
        }

        $value = $this->dataContainer->getModel()->getProperty($this->orderField);

        // support serialized values.
        if (!\is_array($value)) {
            $value = StringUtil::deserialize($value, true);
        }

        $this->orderId         = $this->orderField . \str_replace($this->strField, '', $this->strId);
        $this->orderFieldValue = (!empty($value) && \is_array($value)) ? \array_filter($value) : [];
    }
private function setUp()
    {
        // Load the fonts for the drag hint (see #4838)
        $GLOBALS['TL_CONFIG']['loadGoogleFonts'] = true;

        $this->rootDir = \dirname(System::getContainer()->getParameter('kernel.root_dir'));

        if (!$this->dataContainer || !$this->orderField) {
            return;
        }

        $value = $this->dataContainer->getModel()->getProperty($this->orderField);

        // support serialized values.
        if (!\is_array($value)) {
            $value = StringUtil::deserialize($value, true);
        }

        $this->orderId         = $this->orderField . \str_replace($this->strField, '', $this->strId);
        $this->orderFieldValue = (!empty($value) && \is_array($value)) ? \array_filter($value) : [];
    }
private function setUp ( ) { // Load the fonts for the drag hint (see #4838) $ GLOBALS [ 'TL_CONFIG' ] [ 'loadGoogleFonts' ] = true ; $ this -> rootDir = \ dirname ( System :: getContainer ( ) -> getParameter ( 'kernel.root_dir' ) ) ; if ( ! $ this -> dataContainer || ! $ this -> orderField ) { return ; } $ value = $ this -> dataContainer -> getModel ( ) -> getProperty ( $ this -> orderField ) ; // support serialized values. if ( ! \ is_array ( $ value ) ) { $ value = StringUtil :: deserialize ( $ value , true ) ; } $ this -> orderId = $ this -> orderField . \ str_replace ( $ this -> strField , '' , $ this -> strId ) ; $ this -> orderFieldValue = ( ! empty ( $ value ) && \ is_array ( $ value ) ) ? \ array_filter ( $ value ) : [ ] ; }
Setup the file tree widget.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Setup the file tree widget .