Get Content Section Service.

Get Section service that lets you manipulate section objects

@return \eZ\Publish\API\Repository\SectionService
765028
public function getSectionService()
    {
        if (null === $this->sectionService) {
            $this->sectionService = new SectionService(
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->sectionService;
    }
344583
public function getURLService()
    {
        if ($this->urlService !== null) {
            return $this->urlService;
        }

        $this->urlService = new URLService(
            $this,
            $this->persistenceHandler->urlHandler()
        );

        return $this->urlService;
    }
892004
public function getSection($section)
    {
        $section = $this->get($section);

        if (!$section instanceof self) {
            if (is_array($section) || ($section instanceof \Traversable)) {
                $section = new static($section);
            } else {
                $section = new static();
            }
        }

        return $section;
    }
996280
public function getService()
    {
        $service = $this->getOption('service');

        return \Owl\Service\Container::getInstance()->get($service);
    }
16613
public function get_content() {

        // The config should be loaded by now.
        // If its empty then we will use the global config for the section links block.
        if (isset($this->config)){
            $config = $this->config;
        } else{
            $config = get_config('block_section_links');
        }

        if ($this->content !== null) {
            return $this->content;
        }

        $this->content = new stdClass;
        $this->content->footer = '';
        $this->content->text   = '';

        if (empty($this->instance)) {
            return $this->content;
        }

        $course = $this->page->course;
        $courseformat = course_get_format($course);
        $numsections = $courseformat->get_last_section_number();
        $context = context_course::instance($course->id);

        // Course format options 'numsections' is required to display the block.
        if (empty($numsections)) {
            return $this->content;
        }

        // Prepare the increment value.
        if (!empty($config->numsections1) and ($numsections > $config->numsections1)) {
            $inc = $config->incby1;
        } else if ($numsections > 22) {
            $inc = 2;
        } else {
            $inc = 1;
        }
        if (!empty($config->numsections2) and ($numsections > $config->numsections2)) {
            $inc = $config->incby2;
        } else {
            if ($numsections > 40) {
                $inc = 5;
            }
        }

        // Prepare an array of sections to create links for.
        $sections = array();
        $canviewhidden = has_capability('moodle/course:update', $context);
        $coursesections = $courseformat->get_sections();
        $coursesectionscount = count($coursesections);
        $sectiontojumpto = false;
        for ($i = $inc; $i <= $coursesectionscount; $i += $inc) {
            if ($i > $numsections || !isset($coursesections[$i])) {
                continue;
            }
            $section = $coursesections[$i];
            if ($section->section && ($section->visible || $canviewhidden)) {
                $sections[$i] = (object)array(
                    'section' => $section->section,
                    'visible' => $section->visible,
                    'highlight' => false
                );
                if ($courseformat->is_section_current($section)) {
                    $sections[$i]->highlight = true;
                    $sectiontojumpto = $section->section;
                }
            }
        }

        if (!empty($sections)) {
            // Render the sections.
            $renderer = $this->page->get_renderer('block_section_links');
            $this->content->text = $renderer->render_section_links($this->page->course, $sections, $sectiontojumpto);
        }

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

        return $this->section;
    }
967749
public function getServices()
        {
            return isset($this->_data[self::PROFILE][self::SERVICES]) ? $this->_data[self::PROFILE][self::SERVICES] : null;
        }
1264676
public function getRoot()
    {
        if ($this->getSection()->getRoot() instanceof Section) {
            return $this->getSection()->getRoot()->getPage();
        }

        return null;
    }
489354
public function getSection($section) {
		if (!isset($this->configValues[$section])) {
			return null;
		}
		return $this->configValues[$section];
	}
549592
public function getTrashService()
    {
        if ($this->trashService !== null) {
            return $this->trashService;
        }

        $this->trashService = new TrashService(
            $this,
            $this->persistenceHandler,
            $this->getNameSchemaService(),
            $this->getPermissionCriterionResolver(),
            $this->serviceSettings['trash']
        );

        return $this->trashService;
    }
1202806
public function getContentLanguageService()
    {
        if (null === $this->languageService) {
            $this->languageService = new LanguageService(
                $this->getContentService(),
                'eng-US',
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->languageService;
    }
1302254
public function getUserService()
    {
        if (null === $this->userService) {
            $this->userService = new UserService(
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->userService;
    }
798679
public function getContent()
    {
        if ($this->content === null) {
            $this->content = new Resource();
            $this->content->setLastModified(new \DateTime());
        }

        return $this->content;
    }
1103790
protected function getClassService()
    {
        if (is_null($this->service)) {
            $this->service = DeliveryTemplateService::singleton();
        }
        return $this->service;
    }
1367137
protected static function getPageService(): PageService {
    $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
    $pageService   = $objectManager->get(PageService::class);

    return $pageService;
  }
555167
protected function getContent()
    {
        $content = $this->session->has($this->instance)
            ? $this->session->get($this->instance)
            : new Collection;

        return $content;
    }
966372
public function get($id = null)
    {
        if (!is_null($id)) {
            if (isset($this->sections[$id])) {
                return $this->sections[$id];
            }
            return;

        }
        return $this->sections;
    }