当前位置: 首页>>代码示例>>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;未经允许,请勿转载。