public function delete($category)
    {
        if (!is_object($category)) {
            $category = $this->find($category);
        }

        if ($category instanceof category) {
            if ($this->fireEvent('deleting', array($category)) === false) {
                return false;
            }

            $category->setCaller($this);
            $category->delete($this);

            $this->fireEvent('deleted', array($category));
        }
    }
public function delete($category)
    {
        if (!is_object($category)) {
            $category = $this->find($category);
        }

        if ($category instanceof category) {
            if ($this->fireEvent('deleting', array($category)) === false) {
                return false;
            }

            $category->setCaller($this);
            $category->delete($this);

            $this->fireEvent('deleted', array($category));
        }
    }
public function delete ( $ category ) { if ( ! is_object ( $ category ) ) { $ category = $ this -> find ( $ category ) ; } if ( $ category instanceof category ) { if ( $ this -> fireEvent ( 'deleting' , array ( $ category ) ) === false ) { return false ; } $ category -> setCaller ( $ this ) ; $ category -> delete ( $ this ) ; $ this -> fireEvent ( 'deleted' , array ( $ category ) ) ; } }
Delete a Category.

@param \Subbly\Model\Category|string $category The category_id or the category model

@return \Subbly\Model\Category

@pi
Delete a Category .