Todaymade\Daux\Config::isMultilanguage PHP Method

isMultilanguage() public method

public isMultilanguage ( )
    public function isMultilanguage()
    {
        return array_key_exists('languages', $this) && !empty($this['languages']);
    }

Usage Example

Example #1
0
 /**
  * @return Config
  */
 public function getParams()
 {
     if ($this->tree && !$this->merged_tree) {
         $this->options['tree'] = $this->tree;
         $this->options['index'] = $this->tree->getIndexPage() ?: $this->tree->getFirstPage();
         if ($this->options->isMultilanguage()) {
             foreach ($this->options['languages'] as $key => $name) {
                 $this->options['entry_page'][$key] = $this->tree->getEntries()[$key]->getFirstPage();
             }
         } else {
             $this->options['entry_page'] = $this->tree->getFirstPage();
         }
         $this->merged_tree = true;
     }
     return $this->options;
 }