View::getLayoutID()

@return
542726
public function getLayoutID(){
        $out = '';
        extract($this->request->params);  
        
        if ($prefix) {
            $out  .= ucfirst($prefix).'-' ; 
        }

        if ($plugin) {
            $out  .= ucfirst($plugin) ; 
        }

        $out .= ucfirst($controller);
        $out .= ucfirst($action);
        
        return  $out;
    }
681447
private function _getRelatedLayoutIds($field)
    {
        return (new Query())
            ->select(['layoutId','tabId'])
            ->from(['{{%fieldlayoutfields}}'])
            ->where('fieldId=:id', [':id' => $field->id])
            ->orderBy('layoutId ASC')
            ->all();
    }
192562
public static function getByID($arLayoutPresetID)
    {
        $db = Loader::db();
        $row = $db->GetRow(
            'select arLayoutID, arLayoutPresetID, arLayoutPresetName from AreaLayoutPresets where arLayoutPresetID = ?',
            array(
                $arLayoutPresetID,
            )
        );
        if (is_array($row) && $row['arLayoutPresetID']) {
            $preset = new static();
            $preset->setPropertiesFromArray($row);

            return $preset;
        }
    }
779239
public function getLayoutAdapter()
    {
        if (null === $this->layoutAdapter) {
            $class = $this->config['layout']['adapter'];

            $this->layoutAdapter = new $class;
            $this->layoutAdapter->setEditor($this);
        }

        return $this->layoutAdapter;
    }
1065548
public static function getByID($arLayoutID)
    {
        $db = Database::connection();
        $row = $db->GetRow('select arLayoutID, arLayoutIsPreset, arLayoutUsesThemeGridFramework from AreaLayouts where arLayoutID = ?', array($arLayoutID));
        if (is_array($row) && $row['arLayoutID']) {
            if ($row['arLayoutUsesThemeGridFramework']) {
                $al = new ThemeGridLayout();
            } elseif ($row['arLayoutIsPreset']) {
                $al = new PresetLayout();
            } else {
                $al = new CustomLayout();
            }
            $al->setPropertiesFromArray($row);
            $al->loadDetails();
            $al->loadColumnNumber();

            return $al;
        }
    }
569601
public function getLayouts(): array
    {
        $layouts = [];

        foreach ($this->config->get('layouts') as $layout) {
            $layout->setParentKey($this->getKey());

            $layouts[] = $layout->toArray();
        }

        return $layouts;
    }
970889
public function listLayoutAction()
    {
        $this->view->setLayoutDisabled();
        if (!$this->object || !$this->objectId || !$this->hash || !$this->t) {
            return '';
        }
        if ($this->hash != md5(\Mmi\Session\Session::getId() . '+' . $this->t . '+' . $this->objectId)) {
            return '';
        }
        $files = [];
        $thumb = new \Cms\Mvc\ViewHelper\Thumb();
        foreach (\Cms\Orm\CmsFileQuery::byObjectAndClass($this->object, $this->objectId, $this->class)->find() as $file) {
            switch ($file->class) {
                case 'image':
                    $full = $thumb->thumb($file, 'default');
                    $small = $file->getUrl('scaley', '60', false);
                    $poster = null;
                    break;
                case 'audio':
                case 'video':
                    $full = $file->getUrl();
                    $small = '';
                    $poster = $file->data->posterFileName ? (new FileSystemModel($file->data->posterFileName))->getPublicPath() : null;
                    break;
            }

            $files[] = [
                'id' => $file->id,
                'title' => $file->original,
                'full' => $full,
                'thumb' => $small,
                'poster' => $poster,
                'class' => $file->class,
                'mime' => $file->mimeType,
            ];
        }

        //przekazanie danych
        $this->view->files = $files;
    }
1209634
public function getLayout() {
        $methods = array(
        //  Method            These are the rights in ACL that allow for the method to be executed
            'fetch'        => array('fetch', 'fetch_own'),
            'create',
            'update'       => array('update', 'update_own'),
            'destroy'      => array('destroy', 'destroy_own'),
            'count'        => array('fetch'),
            'relate'
        );
        $auth = Garp_Auth::getInstance();

        if (is_null($this->_layout)) {
            // read content managing configuration from content.ini
            // note; Garp_Cache_Config is not used here because we always want fresh data in the CMS, 
            // no cached versions
            $config = Garp_Content_Api::_getConfig();
            $classes = $config->content->commands;
            $api = new stdClass();
            $api->actions = array();
            foreach ($classes as $key => $class) {
                $alias = !empty($class->alias) ? $class->alias : $key;
                $modelName = self::modelAliasToClass($alias);

                if (!array_key_exists($alias, $api->actions)) {
                    $api->actions[$alias] = array();
                }
                
                foreach ($methods as $method => $privileges) {
                    if (is_numeric($method)) {
                        $method = $privileges;
                        $privileges = array($method);
                    }
                    // Check if any of the given privileges allow for the method to be executed
                    $allowed = false;
                    foreach ($privileges as $privilege) {
                        if ($auth->isAllowed($modelName, $privilege)) {
                            $allowed = true;
                            break;
                        }
                    }
                    // If the method is not allowed, don't mention it in the SMD
                    if (!$allowed) {
                        continue;
                    }

                    $api->actions[$alias][] = array(
                        'name'  => $method,
                        'len'   => 1 // always expect 1 argument: an array containing named arguments
                    );
                }
            }
            $this->_layout = $api;
        }
        return $this->_layout;
    }
634986
public function getViewId()
    {
        $viewId = is_null($this->viewId) ? strtolower($this->getControllerKey()) : $this->viewId;
        return $this->getNavigation()->getClassId($viewId);
    }
122752
public function widgetId()
    {
        if (!$this->widgetId) {
            $type = $this->type();
            switch ($type) {
                case static::PROPERTY_DISPLAY:
                    $id = $this->display()->displayId();
                    break;

                case static::PROPERTY_CONTROL:
                    $id = $this->input()->inputId();
                    break;

                default:
                    $id = 'widget_'.uniqid();
                    break;
            }

            $this->widgetId = $id;
        }

        return $this->widgetId;
    }
1085944
public function getLayoutRootPath()
    {
        if ($this->layoutRootPath === null && $this->templatePathAndFilename === null) {
            throw new Exception\InvalidTemplateResourceException('No layout root path has been specified. Use setLayoutRootPath().', 1288091419);
        }
        if ($this->layoutRootPath === null) {
            $this->layoutRootPath = dirname($this->templatePathAndFilename) . '/Layouts';
        }
        return $this->layoutRootPath;
    }
893693
public function getView(Layout $layout)
    {
        $identifier = $layout->getTemplateFile();

        if (null === $this->view[$identifier]) {
            $this->view[$identifier] = $this->getViewInstance($layout);
        }

        return clone $this->view[$identifier];
    }
28828
public function assignLayout($layoutId)
    {
        $this->getLogger()->info('Assigning Layout ID ' . json_encode($layoutId) . ' To display Group ID ' . $this->displayGroupId);
        $this->doPost('/displaygroup/' . $this->displayGroupId . '/layout/assign', [
            'layoutId' => $layoutId
            ]);

        return $this;
    }
925893
public function getView(): View
    {
        $path = $this->useShortViewPath ?
            $this->getViewPath() : sprintf('%s.%s.%s', $this->getTheme(), $this->getLayout(), $this->getViewPath());

        if (is_null($this->viewInstance)) {
            $this->viewInstance = $this->factory->make($path);
        }

        return $this->viewInstance;
    }
768067
public function getLayoutTemplate(string $context = ViewInterface::CONTEXT_DEFAULT): ?string
    {
        $layoutView = $this->buildLayoutView($context);
        if (!$layoutView instanceof LayoutViewInterface) {
            return $this->getPageLayoutTemplate();
        }

        return $layoutView->getTemplate();
    }
1221452
public function display()
    {
        if (is_dir($this->getTemplate()->findPath($this->getLayout()))) {
            $this->setLayout($this->getLayout().'/default');
        }

        return parent::display();
    }
705856
public function setLayoutId( $layoutId )
    {
        $this->_layout  = null;
        $this->layoutId = ( (int) $layoutId ) ?: null;
        return $this;
    }