Backend\Modules\Tags\Engine\Model::getAll PHP Method

getAll() public static method

Get all tags.
public static getAll ( string $language = null ) : array
$language string
return array
    public static function getAll($language = null)
    {
        $language = $language != null ? (string) $language : BL::getWorkingLanguage();
        return (array) BackendModel::getContainer()->get('database')->getRecords('SELECT i.tag AS name
             FROM tags AS i
             WHERE i.language = ?', array($language));
    }

Usage Example

Example #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->output(self::OK, BackendTagsModel::getAll());
 }