Exemplo n.º 1
0
 public function itemTagIds(TaggableItem $item)
 {
     $out = [];
     $this->queryAdapterItemsPrefixes();
     $query = $this->_db->queryAdapter()->select('tag_items', ['item_type' => $item->type(), 'item' => $item->id()], $this->_queryAdapterItemsPrefixes);
     $stmt = $this->_db->prepare($query[GC_AFIELD_QUERY]);
     //
     // Retrieving information.
     $stmt->execute($query[GC_AFIELD_PARAMS]);
     if ($stmt->rowCount()) {
         foreach ($stmt->fetchAll() as $row) {
             $out[] = $row["{$this->_queryAdapterItemsPrefixes[GC_DBQUERY_PREFIX_COLUMN]}tag"];
         }
     }
     return $out;
 }
 public function remove(TaggableItem $item)
 {
     return $this->removeDirectly($item->type(), $item->id());
 }