19 return "il_orgu_positions";
28 public static function get()
60 public function delete()
63 throw new ilException(
'Cannot delete Core-Position');
76 $q =
"SELECT DISTINCT il_orgu_positions.id, il_orgu_positions.* 77 FROM il_orgu_positions 78 LEFT JOIN il_orgu_ua ON il_orgu_positions.id = il_orgu_ua.position_id 79 WHERE il_orgu_ua.user_id IS NOT NULL 80 OR il_orgu_positions.core_position = 1";
81 $database =
$GLOBALS[
'DIC']->database();
82 $st = $database->query($q);
86 while (
$data = $database->fetchAssoc($st)) {
87 $position =
new self();
88 $position->buildFromArray(
$data);
89 $positions[] = $position;
105 $q =
"SELECT DISTINCT il_orgu_positions.id, il_orgu_positions.* 106 FROM il_orgu_positions 107 LEFT JOIN il_orgu_ua ON il_orgu_positions.id = il_orgu_ua.position_id AND il_orgu_ua.orgu_id = %s 108 WHERE il_orgu_ua.user_id IS NOT NULL 109 OR core_position = 1";
110 $database =
$GLOBALS[
'DIC']->database();
111 $st = $database->queryF($q,
array(
'integer' ),
array( $orgu_ref_id ));
113 $positions =
array();
115 while (
$data = $database->fetchAssoc($st)) {
116 $position =
new self();
117 $position->buildFromArray(
$data);
118 $positions[] = $position;
202 $return[] = $authority->__toArray();
238 $authority->delete();
242 foreach ($ilOrgUnitUserAssignmentQueries->getUserAssignmentsOfPosition($this->getId()) as $assignment) {
243 $assignment->delete();
361 $authority->setPositionId($this->
getId());
362 if ($authority->getId()) {
363 $authority->update();
365 $authority->create();
367 $ids[] = $authority->getId();
369 if (
count($ids) > 0) {
372 'position_id' => $this->
getId(),
373 ),
array(
'id' =>
'NOT IN',
'position_id' =>
'=' ))->
get() as $authority) {
374 $authority->delete();
378 if (
count($ids) === 0) {
380 'position_id' => $this->
getId(),
381 ))->
get() as $authority) {
382 $authority->delete();
setAuthorities($authorities)
const CORE_POSITION_EMPLOYEE
static getCorePositionId($core_identifier)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getCorePosition($core_identifier)
static where($where, $operator=null)
deleteWithAllDependencies()
This deletes the Position, it's Authorities, dependent Authorities and all User-Assignements! ...
setCoreIdentifier($core_identifier)
static getActiveForPosition($orgu_ref_id)
getDependentAuthorities()
Create styles array
The data for the language used.
setDescription($description)
static flush($class_name)
update($pash, $contents, Config $config)
setCorePosition($core_position)
static returnDbTableName()
const CORE_POSITION_SUPERIOR