Returns the layout adapter.

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

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

        return $this->layoutAdapter;
    }
477104
public function getAdapter(string $name): AdapterInterface
    {
        if (!$this->hasAdapter($name)) {
            throw new Exception\AdapterNotFound('auth adapter '.$name.' is not registered');
        }

        return $this->adapter[$name];
    }
973126
public function getAdapter()
    {
        /**
         * Check for an adapter being defined. if not, fetch the default adapter.
         */
        if ($this->_adapter === null) {
            $this->_adapter = Zend_Db_Table_Abstract::getDefaultAdapter();
            if (null === $this->_adapter) {

                throw new Zend_Validate_Exception('No database adapter present');
            }
        }
        return $this->_adapter;
    }
1036028
public function getAdapterInstance()
    {
        if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getOptions();
        if (! class_exists($adapter)) {
            $adapter = __CLASS__ . '\\' . ucfirst($adapter);
            if (! class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
                $adapter,
                __CLASS__
            ));
        }
        return $this->adapter;
    }
556600
public function getLayout($data = null) {
    $layout = null;

    // 1) Check the passed in data
    if (is_array($data) && array_key_exists(self::LAYOUT_KEY, $data)) {
      $layout = $data[self::LAYOUT_KEY];
      unset($data[self::LAYOUT_KEY]);
    }

    // 2) Check the data on the View
    if ($this->has(self::LAYOUT_KEY)) {
      $layout = $this->get(self::LAYOUT_KEY);
      $this->remove(self::LAYOUT_KEY);
    }

    // 3) Check the Slim configuration
    if (is_null($layout)) {
      $app = Slim::getInstance();
      if (isset($app)) {
        $layout = $app->config(self::LAYOUT_KEY);
      }
    }

    // 4) Use the default layout
    if (is_null($layout)) {
      $layout = self::DEFAULT_LAYOUT;
    }

    return $layout;
  }
799299
public function initAdapter()
    {
        $adapterClassName = $this->getOption('adapter_class_name');

        if (!$this->adapter || !is_a($this->adapter, $adapterClassName)) {
            if (!is_a($adapterClassName, AdapterInterface::class, true)) {
                throw new RendererException(
                    "Passed adapter class $adapterClassName is ".
                    'not a valid '.AdapterInterface::class
                );
            }
            $this->adapter = new $adapterClassName($this, $this->getOptions());
        }

        return $this;
    }
261452
protected function getTranslateAdapter()
    {
        if ($this->translate instanceof \Zend_Translate)
        {
            return $this->translate->getAdapter();
        }

        if (! $this->translate instanceof \Zend_Translate_Adapter) {
            $this->translate = new \MUtil_Translate_Adapter_Potemkin();
        }

        return $this->translate;
    }
945832
public static function createLayoutFactoryBuilder()
    {
        $builder = new LayoutFactoryBuilder(
            new ExpressionProcessor(
                new ExpressionLanguage(),
                new ExpressionEncoderRegistry(
                    [
                        'json' => new JsonExpressionEncoder(new ExpressionManipulator())
                    ]
                )
            )
        );

        $builder->addExtension(new CoreExtension());

        return $builder;
    }
225534
public function getRenderer()
    {
        $locator = $this->getServiceLocator();
        if (null === $this->renderer && $locator->has(Renderer\RendererInterface::class)) {
            $this->setRenderer($locator->get(Renderer\RendererInterface::class));
        }

        return $this->renderer;
    }
1045957
private function autoloadAdapters()
    {
        $rendererConfig = $this->getApplication()->getConfig()->getRendererConfig();
        $adapters = (array) $rendererConfig['adapter'];
        foreach ($adapters as $adapter) {
            $classname = $adapter;
            $adapterConfig = [];
            if (is_array($adapter)) {
                $classname = isset($adapter['class']) ? $adapter['class'] : null;
                $adapterConfig = isset($adapter['config']) && is_array($adapter['config']) ? $adapter['config'] : [];
            }

            $this->addRendererAdapter(new $classname($this, $adapterConfig));
        }

        return $this;
    }
671513
protected static function getFacadeAccessor()
    {
    	$viewPath = dirname(dirname(dirname(__DIR__)));
        $adapter = new Local($viewPath);
        $filesystem = new Filesystem($adapter);
        return $filesystem;
    }
95593
private function getAclAdapter() {
        $config = $this->getConfig();

        // Access control adapter
        $accessControl = $config['accessControl'];

        if (is_callable($accessControl) && !($accessControl instanceof AdapterInterface)) {
            $accessControl = $accessControl();
        }

        if (!$accessControl instanceof AdapterInterface) {
            throw new RuntimeException('Invalid access control adapter');
        }

        if (!$accessControl instanceof MutableAdapterInterface) {
            throw new RuntimeException('The configured access control adapter is not mutable');
        }

        return $accessControl;
    }
360304
protected function loadLayout()
    {
        if ($this->layout instanceof Theme\Layout) {
            // add theme layout public directory
            loader()->addPublicDir($this->layout->getPath() . 'assets');

            presenter()->assets->autoload(
                [
                    'css' => ['layout'],
                    'js'  => ['layout'],
                ]
            );

            $partials = $this->layout->getPartials()->getArrayCopy();

            foreach ($partials as $offset => $partial) {
                if ($partial instanceof SplFileInfo) {
                    presenter()->partials->addPartial($offset, $partial->getPathName());
                }
            }
        }

        return $this;
    }
693162
public function getAdapter()
    {
        if (!$this->adapter) {
            throw new Exception\RuntimeException(sprintf(
                '"%s" unable to load adapter; adapter not found',
                __METHOD__
            ));
        }
        if (method_exists($this->adapter, 'setOptions')) {
            $this->adapter->setOptions($this->getAdapterOptions());
        }

        return $this->adapter;
    }
744874
public function getPageLayout()
    {
        if ($page = $this->getCurrentPage(Page::class)) {
            return $page->getPageLayout();
        }
        
        return Page::create()->getPageLayout();
    }
435407
protected function getLayout()
    {
        $this->setData('homeUrl', $this->getServiceManager()->get(DefaultUrlService::SERVICE_ID)->getUrl('ProctoringHome'));
        $this->setData('logout', $this->getServiceManager()->get(DefaultUrlService::SERVICE_ID)->getUrl('ProctoringLogout'));
        return ['layout.tpl', 'taoProctoring'];
    }
193511
protected function getLayoutFile(Layout $layout)
    {
        $layoutfile = $layout->getPath();
        if (null === $layoutfile && 0 < $this->manageableExt->count()) {
            $adapter = null;
            if (null !== $this->defaultAdapter && null !== $adapter = $this->rendererAdapters->get($this->defaultAdapter)) {
                $extensions = $adapter->getManagedFileExtensions();
            } else {
                $extensions = $this->manageableExt->keys();
            }

            if (0 === count($extensions)) {
                throw new RendererException(
                        'Declared adapter(s) (count:'.$this->rendererAdapters->count().') is/are not able to manage '.
                        'any file extensions at moment.'
                );
            }

            $layoutfile = StringUtils::toPath($layout->getLabel(), array('extension' => reset($extensions)));
            $layout->setPath($layoutfile);
        }

        return $layoutfile;
    }