Theme::hasLayout

@return bool
760952
public function hasLayout($layout)
    {
        $extensions = ['.php', '.phtml', '.html', '.tpl'];

        if (isset($this->presets[ 'extensions' ])) {
            array_unshift($partialsExtensions, $this->presets[ 'extension' ]);
        } elseif (isset($this->presets[ 'extension' ])) {
            array_unshift($extensions, $this->presets[ 'extension' ]);
        }

        $found = false;
        foreach ($extensions as $extension) {
            $extension = trim($extension, '.');

            if ($layout === 'theme') {
                $layoutFilePath = $this->getRealPath() . 'theme.' . $extension;
            } else {
                $layoutFilePath = $this->getRealPath() . 'layouts' . DIRECTORY_SEPARATOR . dash($layout) . DIRECTORY_SEPARATOR . 'layout.' . $extension;
            }

            if (is_file($layoutFilePath)) {
                $found = true;
                break;
            }
        }

        return (bool) $found;
    }
966028
private function hasPasteNewButton()
    {
        $environment     = $this->environment;
        $basicDefinition = $environment->getDataDefinition()->getBasicDefinition();

        return ((true === (bool) ViewHelpers::getManualSortingProperty($environment))
                && (true === empty($this->clipboardItems))
                && (false === $this->isHierarchical())
                && ($basicDefinition->isEditable() && $basicDefinition->isCreatable()));
    }
62859
public function hasTheme($theme)
    {
        if (is_dir($this->getThemesDir() . $theme)) {
            return true;
        } else {
            foreach (modules() as $module) {
                if (in_array($module->getType(), ['KERNEL', 'FRAMEWORK'])) {
                    continue;
                } elseif (is_dir($module->getResourcesDir('themes') . $theme)) {
                    return true;
                }
            }
        }

        return false;
    }
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
1052817
public function hasMessage()
    {
        $has_message = parent::hasMessage();

        foreach ($this->pages as $page) {
            if ($page->hasMessage()) {
                $has_message = true;
                break;
            }
        }

        return $has_message;
    }
399170
protected function buildLayoutFile()
    {
        $stubFiles = $this->getStub('layout');

        $stub = $this->files->get($stubFiles);

        $this->replaceStubFileData($stub);

        return $stub;
    }
105607
public function hasFilters() {
		foreach ($this->columns as $col) {
			if ($col->hasFilters() === true) {
				return true;
			}
		}

		return false;
	}
24257
public function hasMessage()
    {
        $has_message = false;

        foreach ($this->renderers as $renderer) {
            if ($renderer->hasMessage()) {
                $has_message = true;
                break;
            }
        }

        return $has_message;
    }
1280227
public function actionChangePageVersionLayout()
    {
        $params =  Yii::$app->request->bodyParams;
        $pageItemId = $params['pageItemId'];
        $layoutId =  $params['layoutId'];
        $alias =  $params['alias'];

        $model = NavItemPage::findOne(['id' => $pageItemId]);
        
        if ($model) {
            $model->forceNavItem->updateTimestamp();
            return $model->updateAttributes(['layout_id' => $layoutId, 'version_alias' => $alias]);
        }
        
        return false;
    }
611314
protected function _prepareLayout()
    {
        parent::_prepareLayout();

        $tag = $this->getTag();
        if (!$tag) {
            return $this;
        }

        $this->pageConfig->getTitle()->set(__('Tag: %1', $tag->getName()));

        if ($tag && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'))) {
            $breadcrumbs->addCrumb('home', [
                'label' => __('Home'),
                'title' => __('Go to Home Page'),
                'link'  => $this->context->getUrlBuilder()->getBaseUrl(),
            ]);

            $breadcrumbs->addCrumb('blog', [
                'label' => __('Blog'),
                'title' => __('Blog'),
            ]);

            $breadcrumbs->addCrumb($tag->getId(), [
                'label' => __('Tag: %1', $tag->getName()),
                'title' => __('Tag: %1', $tag->getName()),
            ]);
        }

        return $this;
    }
502927
public function hasNext()
    {
        if (parent::hasNext()
            && ($this->getItemPosition() < ($this->getItemOffset() + $this->getItemCount()) - 1)
        ) {
            return true;
        }
        return false;
    }
29103
protected function setupLayout($layout = null)
    {
        $this->layout = !is_null($layout) ? $layout : $this->layout;
        if ($this->layout && is_string($this->layout) && view()->exists($this->layout)) {
            $this->layout = view($this->layout);
        }
    }
705798
public function hasMessage()
    {
        $has_message = parent::hasMessage();
        if (!$has_message && $this->tile !== null) {
            $has_message = $this->tile->hasMessage();
        }

        return $has_message;
    }
138842
public function hasMessage()
    {
        $has_message = false;
        foreach ($this->getDescendants() as $widget) {
            if ($widget->hasMessage()) {
                $has_message = true;
                break;
            }
        }

        return $has_message;
    }
1286100
public function inputLayouts()
    {
        $supported = $this->supportedInputLayouts();
        $layouts   = [];
        foreach ($supported as $layout) {
            $layouts[$layout] = ($layout === $this->inputLayout());
        }

        return $layouts;
    }
755935
public function setLayout($layout)
    {
        if (strpos($layout, ':'))
        {
            $layout = explode(':', $layout);
            $layout = str_replace('.html', '', array_pop($layout));
        }

        return parent::setLayout($layout);
    }
800679
public function hasVisibleSubCats()
    {
        if ($this->_blVisibleSubCats === null) {
            $this->_blVisibleSubCats = false;
            if (($oManufacturerTree = $this->getManufacturerTree())) {
                if (($oManufacturer = $this->getActManufacturer())) {
                    if ($oManufacturer->getId() == 'root') {
                        $this->_blVisibleSubCats = $oManufacturerTree->count();
                        $this->_oSubCatList = $oManufacturerTree;
                    }
                }
            }
        }

        return $this->_blVisibleSubCats;
    }