/**
* Loads a list of tags for the specifies parameters, returns an array of Element\Tag elements
*
* @return array
*/
public function load()
{
$tagsData = $this->db->fetchCol("SELECT id FROM tags" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());
$tags = array();
foreach ($tagsData as $tagData) {
if ($tag = Model\Element\Tag::getById($tagData)) {
$tags[] = $tag;
}
}
$this->model->setTags($tags);
return $tags;
}