/** * * * @param integer $id */ public static function removeByID($id) { $db = eZDB::instance(); $db->begin(); $states = eZContentObjectState::fetchByGroup($id); foreach ($states as $state) { eZContentObjectState::removeByID($state->attribute('id')); } eZPersistentObject::removeObject(eZContentObjectStateGroupLanguage::definition(), array('contentobject_state_group_id' => $id)); eZPersistentObject::removeObject(eZContentObjectStateGroup::definition(), array('id' => $id)); $db->commit(); }
/** * Retrieve the available languages of a content object state group by its numerical ID * * @param integer $id * @return array an array of eZContentObjectStateGroupLanguage objects */ public static function fetchByGroup( $id ) { return eZPersistentObject::fetchObjectList( eZContentObjectStateGroupLanguage::definition(), null, array( 'contentobject_state_group_id' => $id ) ); }