@param integer $layoutId

@return bool
1882
public function setDefaultLayout($layoutId): bool
    {
        $layout = new LayoutRecord();
        $layout->id = $layoutId;
        $layout->name = 'Default';
        $layout->isDefault = true;

        return $layout->save();
    }
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;
        }
    }
140721
public function getLayoutName($layoutId): string
    {
        try {
            $layout = $this->layoutService->loadLayout($layoutId);

            return $layout->getName();
        } catch (Throwable $t) {
            return '';
        }
    }
981691
private function mergeLayoutBlocks( array $layoutA, array $layoutB )
    {
        foreach ( $layoutA as $sectionName => &$blockGroup ) {
            if ( isset( $layoutB[$sectionName] ) ) {
                $blockGroup = array_merge( $blockGroup, $layoutB[$sectionName] );
                unset( $layoutB[$sectionName] );
            }
        }
        return array_merge( $layoutA, $layoutB );
    }
653478
private function isValidWebsiteId($websiteId)
    {
        $websites = $this->storeManager->getWebsites();
        if (array_key_exists($websiteId, $websites)) {
            return true;
        }

        if (is_numeric($websiteId)) {
            // Dont bother checking website codes on numeric input
            return false;
        }
        // @todo hs: build up array of websiteCodes, to prevent wasting time looping
        /** @var Website $website */
        foreach ($websites as $website) {
            if ($website->getCode() == $websiteId) {
                return true;
            }
        }

        return false;
    }
230056
public function unassignLayout($unassignLayoutId = [])
    {
        for ($j = 0; $j < count($unassignLayoutId); $j++) {
            $this->doPost('/campaign/layout/assign/' . $this->campaignId, [
                'unassignLayoutId' => [
                    [
                        'layoutId' => $unassignLayoutId[$j],
                    ]
                ]
            ]);
            $this->getLogger()->info('Removing assignment Layout ID ' . $unassignLayoutId[$j] . ' From Campaign ID ' . $this->campaignId);
        }

        return $this;

    }
835871
public function setArchiveLayout($archiveId, $layoutType)
    {
        Validators::validateArchiveId($archiveId);
        Validators::validateLayout($layoutType);
        
        $this->client->setArchiveLayout($archiveId, $layoutType);
    }
1030363
public function create($data, $layoutId = null)
    {
        if (isset($layoutId)) {
            return $this->client()->put($data, 'layouts/{layoutId}', ['layoutId' => $layoutId]);
        }

        return $this->client()->post($data, 'layouts');
    }
901992
public function translationByLanguageID( $languageID )
    {
        /** @var eZContentLanguage $language */
        $language = eZContentLanguage::fetch( $languageID );
        if ( $language instanceof eZContentLanguage )
            return $this->translationByLocale( $language->attribute( 'locale' ) );

        return false;
    }
1259140
public function loadLayoutData($layoutId, int $status): array
    {
        $query = $this->getLayoutSelectQuery();
        $query->where(
            $query->expr()->eq('l.id', ':id')
        )
        ->setParameter('id', $layoutId, Type::INTEGER);

        $this->applyStatusCondition($query, $status, 'l.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
494209
public function isLayoutValid(Site $site, $layoutKey)
    {
        $themesConfig = $this->getSiteThemeLayoutsConfig($site->getTheme());

        if (!empty($themesConfig[$layoutKey])) {
            return true;
        }

        return false;
    }
703959
public function getLayoutFile($controller,$layoutName)
	{
		$moduleViewPath=$basePath=$this->getViewPath();
		$module=$controller->getModule();
		if(empty($layoutName))
		{
			while($module!==null)
			{
				if($module->layout===false)
					return false;
				if(!empty($module->layout))
					break;
				$module=$module->getParentModule();
			}
			if($module===null)
				$layoutName=Yii::app()->layout;
			else
			{
				$layoutName=$module->layout;
				$moduleViewPath.='/'.$module->getId();
			}
		}
		elseif($module!==null)
			$moduleViewPath.='/'.$module->getId();

		return $controller->resolveViewFile($layoutName,$moduleViewPath.'/layouts',$basePath,$moduleViewPath);
	}
1180359
public function addLayoutBlock(LayoutBlockInterface $layoutBlock)
    {
        $layoutBlock->setPage($this);
        $this->layoutBlock->add($layoutBlock);

        return $this;
    }
1266050
public function deleteAction($layoutId)
    {
        $em = $this->get('doctrine.orm.entity_manager');
        $layout = $em->find('LexikMailerBundle:Layout', $layoutId);

        if (!$layout) {
            throw $this->createNotFoundException(sprintf('No layout found for id "%d".', $layoutId));
        }

        $em->remove($layout);
        $em->flush();

        return $this->redirect($this->generateUrl('lexik_mailer.layout_list'));
    }
768851
public function init($pageId)
    {
        if (!$this->layoutSetup instanceof LayoutSetup) {
            $this->injectLayoutSetup(GeneralUtility::makeInstance(LayoutSetup::class)->init($pageId));
        }
    }
794269
public function canById(int $permissionId): bool
    {
        if (isset($this->permission[$permissionId])) {
            return true;
        }

        return false;
    }
75913
public function hasItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        return $this->cache->has($cacheId);
    }