public function cmdDeleteCollectionItem()
    {
        $id = $this->getParam(0);

        if (empty($id) || !is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        $condition = $id;
        if ($this->getParam('collection')) {
            $condition = array('collection_id' => $id);
        }

        $result = $this->collection_item->delete($condition);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->output();
    }