List sections.

@return \eZ\Publish\Core\REST\Server\Values\SectionList
188239
public function listSections(Request $request)
    {
        if ($request->query->has('identifier')) {
            $sections = array(
                $this->loadSectionByIdentifier($request),
            );
        } else {
            $sections = $this->sectionService->loadSections();
        }

        return new Values\SectionList($sections, $request->getPathInfo());
    }
112851
public function sectionStdList()
	{
		$table = array(
			'name' => 'templates',
			'key'=> 'filename',
			'sortMode' => 'filename',
			'sortDesc' => false,
			'columns' => array(
				array('name' => 'description', 'caption' => 'Описание'),
				#array('name' => 'filename', 'caption' => 'Имя файла'),
			),
			'controls' => array (
				'delete' => '',
				'edit' => '',
			),
			'tabs' => array(
				'width'=>'120px',
				'items'=>array(
					array('caption'=>ADM_ADD, 'name'=>'action', 'value'=>'add'),
				)
			),
		);
		$templates = Templates::getInstance();
		$list = $templates->enum('std');
		$items = array();
		foreach ($list as $key=>$value)
		{
			$items[] = array('filename' => $key, 'description' => $value);
		}
		/** @var TAdminUI $page */
		$page = Eresus_Kernel::app()->getPage();
		$result = $page->renderTable($table, $items);
		return $result;
	}
1322132
public function listContent()
    {
        $filesList = array();
        $numFiles = $this->archive->numFiles;
        for ($i = 0; $i < $numFiles; $i++) {
            $statIndex = $this->archive->statIndex($i);
            $filesList[] = (object) array(
                'filename' => $statIndex['name'],
                'stored_filename' => $statIndex['name'],
                'size' => $statIndex['size'],
                'compressed_size' => $statIndex['comp_size'],
                'mtime' => $statIndex,
                'comment' => ($comment = $this->archive->getCommentIndex
                    ($statIndex['index']) !== false) ? $comment : null,
                'folder' => in_array(substr($statIndex['name'], -1),
                    array('/', '\\')),
                'index' => $statIndex['index'],
                'status' => 'ok',
            );
        }

        return $filesList;
    }
664834
private function getSection()
    {
        $this->section = $this->modelFactory()->get($this->sectionClass());

        return $this->section;
    }
690434
protected function sectionServer()
	{
		$extCheck = [
			'Zend OPcache','memcache','apc','xcache','redis','wincache','Zend Data Cache','curl',
			'odbc','intl','gd','imagick','openssl','xdebug',
		];
		$extensions = [];
		foreach ($extCheck as $ext) {
			$hasExt = extension_loaded($ext);
			$extensions[] = Html::tag('span', $ext, ['class'=>'label label-' . ($hasExt ? 'success' : 'danger')]);
		}

		$ret = [
			'Host'=>AsiUrl::getHost(),
			'Localhost detected'=>$this->valueBool(AsiUrl::isLocalhost()),
			'PHP version'=>phpversion(),
			'PHP info'=>$this->valueModal('PHP info', $this->phpInfo),
			'Relevant extensions'=>implode(' ', $extensions),
		];
		if (ServerConfig::extOpCacheLoaded()) {
			$ret['OpCache enabled'] = $this->valueBool(ServerConfig::opCacheEnabled());
		}

		return $ret;
	}
997256
public function listAction()
    {
        $table = $this->plugin->table;
        if (!is_null(arg('section')))
        {
            $table['condition'] = "`section`='" . arg('section', 'int') . "'";
        }
        $html = $this->ui->renderTable($table);
        return $html;
    }
81047
public function sectionStd()
	{
		Eresus_Kernel::app()->getPage()->title .= ADM_T_DIV.ADM_THEMES_STANDARD;

		$result = '';
		switch (arg('action'))
		{
			case 'update':
				$this->sectionStdUpdate();
				break;
			case 'insert':
				$this->sectionStdInsert();
				break;
			case 'add':
				$result = $this->sectionStdAdd();
				break;
			default:
				if (arg('delete'))
				{
					$this->sectionStdDelete();
				}
				if (arg('id'))
				{
					$result = $this->sectionStdEdit();
				}
				else
				{
					$result = $this->sectionStdList();
				}
		}
		return $result;
	}
1340574
public function visitSection(SectionInterface $section)
    {

        $template = 'section/' . $section->getType() . '.twig';

        return $this
            ->loadTemplate($template)
            ->render(
                [
                    "id" => $section->getId(),
                    "classes" => $section->getClasses(),
                    "data" => $section->getData(),
                    "writables" => $section->getWritables(),
                ]
            );
    }
150180
public function getList()
    {
        $sites = $this->siteManager->findAll();
        $this->addPaginationData($sites);
        $sites = $sites->getItems();
        if (empty($sites)) {
            $this->addInfoMessage(self::INFO_NO_ENTRIES_FOUND);
        }
        return $sites;
    }
1265225
public function loadAllSectionData()
    {
        try {
            return $this->innerGateway->loadAllSectionData();
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1137870
public function sectionRoutes()
    {
        if ($this->sectionRoutes) {
            return $this->sectionRoutes;
        }

        $proto = $this->modelFactory()->create(ObjectRoute::class);

        $sectionTypes = $this->sectionTypes();
        if (empty($sectionTypes)) {
            $sectionTypes = [
                'base' => $this->objType()
            ];
        }

        $loader = $this->collectionLoader()->reset();
        $loader->setModel($proto);

        $filters = [];
        foreach ($sectionTypes as $key => $val) {
            $filters[] = 'route_obj_type = \''.$val.'\'';
        }
        $q = 'SELECT * FROM `'.$proto->source()->table().'`
            WHERE active = 1 AND ('.implode(' OR ', $filters).')
            AND `route_options_ident` IS NULL
            ORDER BY creation_date ASC';

        $objectRoutes = $loader->loadFromQuery($q);

        // $loader->addFilter('route_obj_type', $this->objType())
        //     // This is important. This is why it all works
        //     // Loading it from the first created to the last created
        //     // makes the following foreach override previous data.
        //     ->addOrder('creation_date', 'asc');

        // $objectRoutes = $loader->load();

        $sections = [];
        $routes = [];
        // The current language
        $lang = $this->translator()->getLocale();
        foreach ($objectRoutes as $o) {
            if ($o->lang() === $lang) {
                // Will automatically override previous slug set
                $sections[$o->routeObjId()] = $o->slug();
            }
            // Keep track of EVERY slug.
            $routes[$o->slug()] = $o->routeObjId();
        }

        $this->sectionRoutes = [
            'sections' => $sections,
            'routes'   => $routes
        ];

        return $this->sectionRoutes;
    }
1205039
public function renderSections()
	{
		$env = $this->environment;

		return $this->render(function($view) use ($env)
		{
			return $env->getSections();
		});
	}
8837
public function getAllBySection($section, $default = null)
    {
        $items = $this->getSettingsConfig();

        if (isset($items[$section])) {
            $this->setting = ArrayHelper::getColumn($items[$section], 'value');
        } else {
            $this->setting = $default;
        }

        return $this->setting;
    }
1063360
public List<MaterialSection> getSectionList() {
        List<MaterialSection> list = new LinkedList<>();

        for(MaterialSection section : sectionList)
            list.add(section);

        for(MaterialSection section : bottomSectionList)
            list.add(section);

        return list;
    }
830514
public function getSectionRouteRules(string $section, string $format = 'Craft', $siteId = null): array
    {
        return RouteMap::$plugin->routes->getSectionRouteRules($section, $format, $siteId);
    }
152193
public function index()
    {
        $categories = $this->PagesCategories->find()
            ->contain(['Parents' => ['fields' => ['title']]])
            ->order([sprintf('%s.lft', $this->PagesCategories->getAlias()) => 'ASC'])
            ->formatResults(function (ResultSet $results) {
                //Gets categories as tree list
                $treeList = $this->PagesCategories->getTreeList()->toArray();

                return $results->map(function (PagesCategory $category) use ($treeList) {
                    return $category->set('title', $treeList[$category->id]);
                });
            });

        $this->set(compact('categories'));
    }
94816
public function index()
    {
        $languages = Language::all();
        $extends = $this->viewExtends;
        $section = $this->viewSection;

        return view($this->viewNamespace . '.index', compact('languages', 'extends', 'section'));
    }