/** * Retrieve post tags identifiers * * @param EM_Blog_Model_Post $post * @return array */ public function getTagIds($post) { $adapter = $this->_getReadAdapter(); $select = $adapter->select()->from($this->_postTagTable, 'tag_id')->where('post_id = ?', (int) $post->getId()); return $adapter->fetchCol($select); }
/** * Initialize collection parent product and add limitation join * * @param Mage_Catalog_Model_Product $product * @return Mage_Catalog_Model_Resource_Product_Link_Product_Collection */ public function setProduct(EM_Blog_Model_Post $product) { $this->_post = $product; if ($product && $product->getId()) { $this->_hasLinkFilter = true; } return $this; }