/** * Removes single taxonomy * * @param string $taxonomy */ public function removeTaxonomy($taxonomy) { if (!is_string($taxonomy)) { throw new \Exception('PostType taxonomy must be a string.'); } if ($this->taxonomies->hasValue($taxonomy)) { $this->taxonomies->pop($taxonomy); } return $this; }
/** * Removes a single capability * * @param string $capability * @return \Ponticlaro\Bebop\Cms\Taxonomy Taxonomy instance */ public function removeCapability($capability) { if (!is_string($capability)) { throw new \Exception('PostType capability must be a string.'); } if (!$this->capabilities->hasValue($capability)) { $this->capabilities->pop($capability); } return $this; }