/** * Inserts the assignment of $contentId to $sectionId. * * @param int $sectionId * @param int $contentId */ public function assignSectionToContent($sectionId, $contentId) { try { return $this->innerGateway->assignSectionToContent($sectionId, $contentId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Number of content assignments a Section has * * @param mixed $sectionId * * @return int */ public function assignmentsCount($sectionId) { return $this->sectionGateway->countContentObjectsInSection($sectionId); }
/** * Counts the number of role assignments using section with $sectionId in their limitations. * * @param int $sectionId * * @return int */ public function countRoleAssignmentsUsingSection($sectionId) { return $this->sectionGateway->countRoleAssignmentsUsingSection($sectionId); }