コード例 #1
0
ファイル: content.php プロジェクト: hungnv0789/vhtm
	/**
	 * Gets the events that need to be cleaned when the content is updated.
	 */
	protected function getCleanCacheEvents()
	{
		$this->assertContent();

		//we have an event
		// clear cache of affected sections
		$events = $this->content->getParentIds(true);

		$section_contenttype = vB_Types::instance()->getContentTypeID('vBCms_Section');

		foreach ($events AS &$sectionid)
		{
			$sectionid = 'content_' . $section_contenttype . '_' . $sectionid;
		}

		$events[] = 'vbcms_item_' . $this->content->getNodeId() . '_updated';

		return array_merge($events, $this->content->getCacheEvents());
	}
コード例 #2
0
ファイル: staticpage.php プロジェクト: hungnv0789/vhtm
	/**
	 * Fetches the contentid.
	 * How this is interpreted is up to the content handler for the contenttype.
	 * Note that to make vB_Model work properly when instantiating a new item
	 * we need to return the nodeid if we don't have a content id. But we should
	 * be able to get only the contentid if we don't want the nodeid.
	 * @return int
	 */
	public function getContentId($contentonly = false)
	{
		return parent::getNodeId();
	}