MonographDAO::removeCategory PHP Method

removeCategory() public method

Unassociate a category with a monograph.
public removeCategory ( $monographId, $categoryId )
$monographId int
$categoryId int
    function removeCategory($monographId, $categoryId)
    {
        $this->update('DELETE FROM submission_categories WHERE submission_id = ? AND category_id = ?', array((int) $monographId, (int) $categoryId));
        // If any new release or feature object is associated
        // with this category delete them.
        $newReleaseDao = DAORegistry::getDAO('NewReleaseDAO');
        /* @var $newReleaseDao NewReleaseDAO */
        $newReleaseDao->deleteNewRelease($monographId, ASSOC_TYPE_CATEGORY, $categoryId);
        $featureDao = DAORegistry::getDAO('FeatureDAO');
        /* @var $featureDao FeatureDAO */
        $featureDao->deleteFeature($monographId, ASSOC_TYPE_CATEGORY, $categoryId);
    }