protected function _toHtml()
    {
        if (!$this->getOptions()) {
            $cmsPages = $this->cmsPageCollection->addStoreFilter($this->getStoreFromContext());
            foreach ($cmsPages as $cmsPage) {
                /** @var \Magento\Cms\Model\Page $cmsPage */
                $this->addOption($cmsPage->getId(), $cmsPage->getTitle());
            }
        }

        return parent::_toHtml();
    }
protected function _toHtml()
    {
        if (!$this->getOptions()) {
            $cmsPages = $this->cmsPageCollection->addStoreFilter($this->getStoreFromContext());
            foreach ($cmsPages as $cmsPage) {
                /** @var \Magento\Cms\Model\Page $cmsPage */
                $this->addOption($cmsPage->getId(), $cmsPage->getTitle());
            }
        }

        return parent::_toHtml();
    }
protected function _toHtml ( ) { if ( ! $ this -> getOptions ( ) ) { $ cmsPages = $ this -> cmsPageCollection -> addStoreFilter ( $ this -> getStoreFromContext ( ) ) ; foreach ( $ cmsPages as $ cmsPage ) { /** @var \Magento\Cms\Model\Page $cmsPage */ $ this -> addOption ( $ cmsPage -> getId ( ) , $ cmsPage -> getTitle ( ) ) ; } } return parent :: _toHtml ( ) ; }
Retrieves all the pages that are allowed to be
viewed in the current context

@return string
@throws \Magento\Framework\Exception\LocalizedException
@codingStandardsIgnoreStart
Retrieves all the pages that are allowed to be viewed in the current context