Frontend\Core\Language\Locale::frontendLanguage PHP Method

frontendLanguage() public static method

public static frontendLanguage ( ) : self
return self
    public static function frontendLanguage()
    {
        return new self(FRONTEND_LANGUAGE);
    }

Usage Example

Esempio n. 1
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $contentBlock = $this->get('content_blocks.repository.content_block')->findOneByIdAndLocale((int) $this->data['id'], Locale::frontendLanguage());
     // if the content block is not found or if it is hidden, just return an array with empty text
     // @deprecated fix this for version 5, we just shouldn't assign this instead of this hack, but we need it for BC
     if (!$contentBlock instanceof ContentBlock || $contentBlock->isHidden()) {
         $contentBlock = ['text' => ''];
     }
     $this->tpl->assign('widgetContentBlocks', $contentBlock);
     // That's all folks!
 }
All Usage Examples Of Frontend\Core\Language\Locale::frontendLanguage