public function isSectionUsed(Section $section)
    {
        return $this->sectionHandler->assignmentsCount($section->id) > 0 ||
               $this->sectionHandler->policiesCount($section->id) > 0 ||
               $this->sectionHandler->countRoleAssignmentsUsingSection($section->id) > 0;
    }
public function isSectionUsed(Section $section)
    {
        return $this->sectionHandler->assignmentsCount($section->id) > 0 ||
               $this->sectionHandler->policiesCount($section->id) > 0 ||
               $this->sectionHandler->countRoleAssignmentsUsingSection($section->id) > 0;
    }
public function isSectionUsed ( Section $ section ) { return $ this -> sectionHandler -> assignmentsCount ( $ section -> id ) > 0 || $ this -> sectionHandler -> policiesCount ( $ section -> id ) > 0 || $ this -> sectionHandler -> countRoleAssignmentsUsingSection ( $ section -> id ) > 0 ; }
Returns true if the given section is assigned to contents, or used in role policies, or in role assignments.

This does not check user permissions.

@since 6.0

@param \eZ\Publish\API\Repository\Values\Content\Section $section

@return bool
Returns true if the given section is assigned to contents or used in role policies or in role assignments .