Attache les fichiers et styles des composants au layout
@param \Osf\View\Helper $layout
160436
public static function registerScripts(HelperInterface $layout)
    {
        foreach (self::$components as $component) {
            foreach ($component->getScripts() as $script) {
                switch ($script[0]) {
                    case 'headjs' : 
                        $layout->headTags->appendFile($script[1], $script[2], $script[3]);
                        break;
                    case 'headcss' : 
                        $layout->headTags->appendStylesheet($script[1], $script[2], $script[3]);
                        break;
                    case 'footjs' : 
                        $layout->footTags->appendFile($script[1], $script[2], $script[3]);
                        break;
                    case 'footcss' : 
                        $layout->footTags->appendStylesheet($script[1], $script[2], $script[3]);
                        break;
                    case 'script' : 
                        $layout->footTags->appendScript($script[1]);
                        break;
                }
            }
        }
    }
926079
public function registerAssets($view) 
    {
        OwlCarouselAsset::register($view);
        $js = 'jQuery("#' . $this->containerOptions['id'] . '").owlCarousel('. "\n";
        $js .= json_encode($this->pluginOptions)."\n";
        $js .= ");\n";
        $view->registerJs($js, $view::POS_READY);
    }
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;
    }
1081746
public function render($view = null, $layout = null)
    {
        $view = $this->_getFormView($view);
        return parent::render($view, $layout);
    }
970670
public function partialComposer($view, $callback, $layout = null)
    {
        if (! is_array($view)) {
            $view = array($view);
        }

        // Partial path with namespace.
        $path = $this->getThemeNamespace('partials');

        // This code support partialWithLayout.
        if (! is_null($layout)) {
            $path = $path.'.'.$layout;
        }

        $view = array_map(function($v) use ($path) {
            return $path.'.'.$v;
        }, $view);

        $this->view->composer($view, $callback);
    }
1142140
public function updateLayout(Layout $layout): void
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->update('ngbm_layout')
            ->set('type', ':type')
            ->set('name', ':name')
            ->set('description', ':description')
            ->set('created', ':created')
            ->set('modified', ':modified')
            ->set('shared', ':shared')
            ->set('main_locale', ':main_locale')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $layout->id, Type::INTEGER)
            ->setParameter('type', $layout->type, Type::STRING)
            ->setParameter('name', $layout->name, Type::STRING)
            ->setParameter('description', $layout->description, Type::STRING)
            ->setParameter('created', $layout->created, Type::INTEGER)
            ->setParameter('modified', $layout->modified, Type::INTEGER)
            ->setParameter('shared', $layout->shared, Type::BOOLEAN)
            ->setParameter('main_locale', $layout->mainLocale, Type::STRING);

        $this->applyStatusCondition($query, $layout->status);

        $query->execute();
    }
327386
public function compose(View $view)
    {
        $view->with('adminUser', $this->adminUser)
            ->with('sessionId', $this->sessionId);
    }
1135448
public function compose(View $view)
    {

        $sheet = $this->getCorporationSheet(
            $this->request->corporation_id);

        $view->with('sheet', $sheet);

    }
692386
def attach(*layouts, **kwargs):
    

    def _model_admin_wrapper(layout_class):
        register(layout_class, layouts[0])
        return layout_class
    return _model_admin_wrapper
1059845
public function layout($layout)
    {
        // Save the layout
        if ($layout == 'control group') {
            $layout = 'form';
        }

        // Backwards compat
        if (in_array($layout, ['full', 'sidebar', 'form'])) {
            $this->layout = $layout;
        }

        // Make the default width of form layout a span9.  Because typically the form
        // layout is only used on full width forms
        if ($layout == 'form') {
            $this->addClass('span9');
        }

        // Chain
        return $this;
    }
700748
public function compose(View $view)
    {
        $strategy = $this->getValidatedStrategyFromConfig();
        $output = [];

        foreach((array)config("sharp.extensions.assets") as $position => $paths) {
            foreach((array)$paths as $assetPath) {
                if(!isset($output[$position])) {
                    $output[$position] = [];
                }

                // Only render valid assets
                if(ends_with($assetPath, $this->assetTypes)) {
                    // Grab the relevant template based on the filetype
                    $template = array_get($this->renderTemplates, $this->getAssetFileType($assetPath));

                    // Apply the strategy (run through asset() or mix()
                    $resolvedAssetPath = $this->getAssetPathWithStrategyApplied($strategy, $assetPath);

                    $output[$position][] = sprintf($template, $resolvedAssetPath);
                }
            }
        }

        // Build the strings to output in the blades
        $toBind = [];
        foreach((array)$output as $position => $toOutput) {
            $toBind[$position] = implode('', $toOutput);
        }

        $view->with('injectedAssets', $toBind);
    }
157930
public function compose(View $view)
    {
        /**
         * @var  \Carbon\Carbon                  $start
         * @var  \Carbon\Carbon                  $end
         * @var  \Illuminate\Support\Collection  $range
         */
        extract(DateRange::getCurrentMonthDaysRange());

        $view->with('devicesRatio',  $this->getDevicesFromSessions($start, $end));
    }
1130605
private function updateLayoutModifiedDate(Layout $layout): void
    {
        $updatedLayout = clone $layout;
        $updatedLayout->modified = time();
        $this->queryHandler->updateLayout($updatedLayout);
    }
919191
public function includeFunc( View $view)
	{
		if( $this->isFunc() )
		{
			Helper::includeFile( $this->getFuncFilePath(), ["view" => $view], false, true );
		}
		return $this;
	}
171738
public function prepare(Template $template): void
    {
        $formLayout = $this->layoutManager->getDefaultLayout();

        if ($formLayout instanceof HorizontalFormLayout) {
            $template->labelColClass  = $formLayout->getLabelColumnClass();
            $template->colClass       = $formLayout->getColumnClass();
            $template->colOffsetClass = $formLayout->getColumnClass(true);
            $template->rowClass       = $formLayout->getRowClass();
            $template->isHorizontal   = true;
        } else {
            $template->labelColClass  = null;
            $template->colClass       = null;
            $template->colOffsetClass = null;
            $template->rowClass       = null;
            $template->isHorizontal   = false;
        }

        $template->formLayout  = $formLayout;
        $template->buttonClass = $this->getButtonClass();
    }
1223175
public function compose(View $view)
    {
        $view->with('categoriesRatios', $this->prepareRatios(
            $this->cachedCategories()->load(['posts'])
        ));
    }
1262466
public function composeIndex(View $view)
    {
        $this->composeWithTitle($view);
        $this->composeWithLayout($view);
        $this->composeWithAllRouteNames($view);
        $this->composeWithRequiredFields($view);
        $this->composeWithValidationRules($view);
        $this->composeWithPartialsLocation($view);
        $this->composeWithResourceLocation($view);
    }