當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JHelperTags::deleteTagData方法代碼示例

本文整理匯總了PHP中JHelperTags::deleteTagData方法的典型用法代碼示例。如果您正苦於以下問題:PHP JHelperTags::deleteTagData方法的具體用法?PHP JHelperTags::deleteTagData怎麽用?PHP JHelperTags::deleteTagData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JHelperTags的用法示例。


在下文中一共展示了JHelperTags::deleteTagData方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onAfterDelete

 /**
  * The event which runs after deleting a record
  *
  * @param   DataModel &$model The model which calls this event
  * @param   integer   $oid    The PK value of the record which was deleted
  *
  * @return  void
  *
  * @throws  \Exception  Error message if failed to detele tags
  */
 public function onAfterDelete(&$model, $oid)
 {
     $this->tagsHelper->typeAlias = $model->getContentType();
     if (!$this->tagsHelper->deleteTagData($model, $oid)) {
         throw new \Exception('Error deleting Tags');
     }
 }
開發者ID:akeeba,項目名稱:fof,代碼行數:17,代碼來源:Tags.php

示例2: onAfterDelete

 /**
  * The event which runs after deleting a record
  *
  * @param   DataModel &$model The model which calls this event
  * @param   integer   $oid    The PK value of the record which was deleted
  *
  * @return  boolean  True to allow the deletion without errors
  */
 public function onAfterDelete(&$model, $oid)
 {
     // If this resource has tags, delete the tags first
     if ($model->hasTags()) {
         $tagsHelper = new \JHelperTags();
         $tagsHelper->typeAlias = $model->getContentType();
         if (!$tagsHelper->deleteTagData($model, $oid)) {
             throw new \Exception('Error deleting Tags');
         }
     }
 }
開發者ID:Joal01,項目名稱:fof,代碼行數:19,代碼來源:Tags.php

示例3: onAfterDelete

 /**
  * The event which runs after deleting a record
  *
  * @param   FOFTable &$table  The table which calls this event
  * @param   integer  $oid  The PK value of the record which was deleted
  *
  * @return  boolean  True to allow the deletion without errors
  */
 public function onAfterDelete(&$table, $oid)
 {
     // If this resource has tags, delete the tags first
     if ($table->hasTags()) {
         $tagsHelper = new JHelperTags();
         $tagsHelper->typeAlias = $table->getAssetKey();
         if (!$tagsHelper->deleteTagData($table, $oid)) {
             $table->setError('Error deleting Tags');
             return false;
         }
     }
 }
開發者ID:shoffmann52,項目名稱:install-from-web-server,代碼行數:20,代碼來源:tags.php

示例4: delete

 /**
  * Override parent delete method to process tags
  *
  * @param   integer  $pk        The primary key of the node to delete.
  * @param   boolean  $children  True to delete child nodes, false to move them up a level.
  *
  * @return  boolean  True on success.
  *
  * @since   3.1
  * @throws  UnexpectedValueException
  */
 public function delete($pk = null, $children = true)
 {
     $result = parent::delete($pk);
     $this->tagsHelper->typeAlias = $this->extension . '.category';
     return $result && $this->tagsHelper->deleteTagData($this, $pk);
 }
開發者ID:GitIPFire,項目名稱:Homeworks,代碼行數:17,代碼來源:category.php

示例5: onBeforeDelete

 /**
  * Pre-processor for $table->delete($pk)
  *
  * @param   mixed   $pk        An optional primary key value to delete.  If not set the instance property value is used.
  * @param   string  $tableKey  The normal key of the table
  *
  * @return  void
  *
  * @throws  UnexpectedValueException
  */
 public function onBeforeDelete($pk, $tableKey)
 {
     $this->parseTypeAlias();
     $this->tagsHelper->deleteTagData($this->table, $pk);
 }
開發者ID:fur81,項目名稱:zofaxiopeu,代碼行數:15,代碼來源:tags.php

示例6: deleteListItems

 function deleteListItems($ids)
 {
     $this->onExecuteBefore('deleteListItems', array(&$ids));
     $tags = new JHelperTags();
     $table = $this->getTable('products');
     $tags->typeAlias = 'com_ksenmart.product';
     foreach ($ids as $id) {
         $table->load($id);
         $tags->deleteTagData($table, $id);
         $query = $this->_db->getQuery(true);
         $query->delete('#__ksenmart_product_properties_values')->where('product_id=' . $id);
         $this->_db->setQuery($query);
         $this->_db->query();
         $query = $this->_db->getQuery(true);
         $query->delete('#__ksenmart_products_categories')->where('product_id=' . $id);
         $this->_db->setQuery($query);
         $this->_db->query();
         $query = $this->_db->getQuery(true);
         $query->delete('#__ksenmart_products_child_groups')->where('product_id=' . $id);
         $this->_db->setQuery($query);
         $this->_db->query();
         $query = $this->_db->getQuery(true);
         $query->delete('#__ksenmart_products_relations')->where('product_id=' . $id);
         $this->_db->setQuery($query);
         $this->_db->query();
         $query = $this->_db->getQuery(true);
         $query->delete('#__ksenmart_products')->where('id=' . $id);
         $this->_db->setQuery($query);
         $this->_db->query();
         KSMedia::deleteItemMedia($id, 'product');
         $query = $this->_db->getQuery(true);
         $query->select('id')->from('#__ksenmart_products')->where('parent_id=' . $id);
         $this->_db->setQuery($query);
         $childs = $this->_db->loadColumn();
         if (count($childs) > 0) {
             $this->deleteListItems($childs);
         }
     }
     $this->onExecuteAfter('deleteListItems', array(&$ids));
     return true;
 }
開發者ID:JexyRu,項目名稱:Ksenmart,代碼行數:41,代碼來源:catalog.php

示例7: delete

	/**
	 * Override parent delete method to delete tags information.
	 *
	 * @param   integer  $pk  Primary key to delete.
	 *
	 * @return  boolean  True on success.
	 *
	 * @since   3.1
	 * @throws  UnexpectedValueException
	 */
	public function delete($pk = null)
	{
		$result = parent::delete($pk);
		return $result && $this->tagsHelper->deleteTagData($this, $pk);
	}
開發者ID:GitIPFire,項目名稱:Homeworks,代碼行數:15,代碼來源:contact.php

示例8: delete

 /**
  * Override parent delete method to delete tags information.
  *
  * @param   integer  $pk  Primary key to delete.
  *
  * @return  boolean  True on success.
  *
  * @since   3.1
  * @throws  UnexpectedValueException
  */
 public function delete($pk = null)
 {
     $result = parent::delete($pk);
     $this->tagsHelper->typeAlias = 'com_content.article';
     return $result && $this->tagsHelper->deleteTagData($this, $pk);
 }
開發者ID:GitIPFire,項目名稱:Homeworks,代碼行數:16,代碼來源:content.php

示例9: deleteUCM

 function deleteUCM($type, $elements)
 {
     if (!isset($this->structure[$type]) || !$this->_isCompatible) {
         return false;
     }
     $structure = $this->structure[$type];
     $component = 'hikashop';
     if (!empty($structure['component'])) {
         $component = $structure['component'];
     }
     $alias = 'com_' . $component . '.' . $structure['table'];
     $tagsHelper = new JHelperTags();
     $tagsHelper->typeAlias = $alias;
     $id = $structure['id'];
     $tagsTable = new JHikaShopTagTable($structure, null);
     $ret = true;
     foreach ($elements as $element) {
         if (empty($element)) {
             continue;
         }
         $tagsTable->{$id} = $element;
         if (!$tagsHelper->deleteTagData($tagsTable, $element)) {
             $ret = false;
         }
     }
     return $ret;
 }
開發者ID:q0821,項目名稱:esportshop,代碼行數:27,代碼來源:tags.php


注:本文中的JHelperTags::deleteTagData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。