/** * Sets the definition of an item. * * @param string $iid the identifier of the item * @param string $url the URL that refers directly to the item * @param string $refurl the URL of the page where the user can get information on the item * @param int $datatype optional - the type of the item, otherwise the default type */ public function execute() { $ret = Api_Bo_Items::setInfo($this->aid, $this->iid, $this->url, $this->refurl, $this->datatype); $response = array(); $response['result'] = $ret ? '1' : '0'; return $response; }
/** * Removes the item so that it no longer appears in item queries. * * @param int $iid the ID of the item to remove * * public function items_remove($iid) */ public function execute() { $ret = Api_Bo_Items::deleteItem($this->getAppId(), $this->item_id); $response = array(); $response['result'] = $ret ? '1' : '0'; return $response; }
/** * Gets the definition of a set of items. * * @param array $iids item identifiers for which to retrieve definitions * @param array $datatype optional - the set of data types to filter * * public function items_getInfo($iids, $datatype = null) */ public function execute() { $items = Api_Bo_Items::getInfo($this->app_id, $this->iids, $this->datatype); $retVal = array(); if (count($items) > 0) { $retVal['item'] = array(); foreach ($items as $item) { $retVal['item'][] = array('iid' => $item['item_id'], 'url' => $item['item_url'], 'refurl' => $item['item_refurl'], 'datatype' => $item['item_data_type']); } } return $retVal; }