Frontend\Core\Engine\Language::lbl PHP Метод

lbl() публичный статический Метод

Get a label from the language-file
public static lbl ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
Результат string
    public static function lbl($key, $fallback = true)
    {
        trigger_error('Frontend\\Core\\Engine\\Language is deprecated.
             It has been moved to Frontend\\Core\\Language\\Language', E_USER_DEPRECATED);
        return parent::lbl($key, $fallback);
    }

Usage Example

Пример #1
0
 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     // validate incoming parameters
     if ($this->URL->getParameter(1) === null) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // fetch record
     $this->record = FrontendTagsModel::get($this->URL->getParameter(1));
     // validate record
     if (empty($this->record)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // fetch modules
     $this->modules = FrontendTagsModel::getModulesForTag($this->record['id']);
     // loop modules
     foreach ($this->modules as $module) {
         // get the ids of the items linked to the tag
         $otherIds = (array) $this->get('database')->getColumn('SELECT other_id
              FROM modules_tags
              WHERE module = ? AND tag_id = ?', array($module, $this->record['id']));
         // set module class
         $class = 'Frontend\\Modules\\' . $module . '\\Engine\\Model';
         // get the items that are linked to the tags
         $items = (array) FrontendTagsModel::callFromInterface($module, $class, 'getForTags', $otherIds);
         // add into results array
         if (!empty($items)) {
             $this->results[] = array('name' => $module, 'label' => FL::lbl(\SpoonFilter::ucfirst($module)), 'items' => $items);
         }
     }
 }
All Usage Examples Of Frontend\Core\Engine\Language::lbl