Contao\ContentGallery::generate PHP Метод

generate() публичный Метод

Return if there are no files
public generate ( ) : string
Результат string
    public function generate()
    {
        // Use the home directory of the current user as file source
        if ($this->useHomeDir && FE_USER_LOGGED_IN) {
            $this->import('FrontendUser', 'User');
            if ($this->User->assignDir && $this->User->homeDir) {
                $this->multiSRC = array($this->User->homeDir);
            }
        } else {
            $this->multiSRC = \StringUtil::deserialize($this->multiSRC);
        }
        // Return if there are no files
        if (!is_array($this->multiSRC) || empty($this->multiSRC)) {
            return '';
        }
        // Get the file entries from the database
        $this->objFiles = \FilesModel::findMultipleByUuids($this->multiSRC);
        if ($this->objFiles === null) {
            return '';
        }
        return parent::generate();
    }
ContentGallery