/** * Returns an associative array of all blog tags. * * @return mixed * An associative array of all tags, or null if there are no blog tags. */ public function getAllTags() { $blogEntryTags = new Datasource_Cms_Connect_BlogEntryTags(); $allTags = $blogEntryTags->getAll(); $returnArray = array(); foreach ($allTags as $currentTag) { $returnArray[] = array('id' => $currentTag['id'], 'tag' => $currentTag['tag']); } if (empty($returnArray)) { $returnVal = null; } else { $returnVal = $returnArray; } return $returnVal; }
/** * Returns a comma seperated list of possible tags for the admin system * * @return string */ public function getPossibleTags() { $blogTags = new Datasource_Cms_Connect_BlogEntryTags(); $currentTags = $blogTags->getAll(); $tagList = array(); foreach ($currentTags as $currentTag) { $tagList[] = '"' . $currentTag['tag'] . '"'; } return implode(',', $tagList); }