コード例 #1
0
 /**
  * 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);
     }
 }
コード例 #2
0
 /**
  * Number of content assignments a Section has
  *
  * @param mixed $sectionId
  *
  * @return int
  */
 public function assignmentsCount($sectionId)
 {
     return $this->sectionGateway->countContentObjectsInSection($sectionId);
 }
コード例 #3
0
ファイル: Handler.php プロジェクト: Pixy/ezpublish-kernel
 /**
  * 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);
 }