/** * @see Object_Class_Data::getDataForQueryResource * @param string $data * @param null|Object_Abstract $object * @return string */ public function getDataForQueryResource($data, $object = null) { $dbTable = new Tagfield_Tagfield(); $dbTable->setTags($this->tagskey, $data); if (!empty($data) && is_array($data)) { return "," . implode(",", $data) . ","; } return; }
public function gettagsAction() { $key = $this->_getParam("key"); $table = new Tagfield_Tagfield(); $tags = $table->getTagsByKey($key); $datas = array(); foreach ($tags as $tag) { $datas[] = array("value" => $tag["tag"]); } $this->_helper->json(array("datas" => $datas)); }