Backend\Core\Engine\Language::msg PHP Method

msg() public static method

Get a message from the language-file
Deprecation:
public static msg ( string $key, string $module = null ) : string
$key string The key to get.
$module string The module wherein we should search.
return string
    public static function msg($key, $module = null)
    {
        trigger_error('Backend\\Core\\Engine\\Language is deprecated.
             It has been moved to Backend\\Core\\Language\\Language', E_USER_DEPRECATED);
        return parent::msg($key, $module);
    }

Usage Example

Beispiel #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // get parameters
     $categoryTitle = trim(\SpoonFilter::getPostValue('value', null, '', 'string'));
     // validate
     if ($categoryTitle === '') {
         $this->output(self::BAD_REQUEST, null, BL::err('TitleIsRequired'));
     } else {
         // get the data
         // build array
         $item['title'] = \SpoonFilter::htmlspecialchars($categoryTitle);
         $item['language'] = BL::getWorkingLanguage();
         $meta['keywords'] = $item['title'];
         $meta['keywords_overwrite'] = 'N';
         $meta['description'] = $item['title'];
         $meta['description_overwrite'] = 'N';
         $meta['title'] = $item['title'];
         $meta['title_overwrite'] = 'N';
         $meta['url'] = BackendBlogModel::getURLForCategory(\SpoonFilter::urlise($item['title']));
         // update
         $item['id'] = BackendBlogModel::insertCategory($item, $meta);
         // output
         $this->output(self::OK, $item, vsprintf(BL::msg('AddedCategory'), array($item['title'])));
     }
 }
All Usage Examples Of Backend\Core\Engine\Language::msg