public function JobItem::getSiblings

Retrieves all siblings of this job item.

Return value

array An array of job items that are the siblings of this job item.

Overrides JobItemInterface::getSiblings

File

src/Entity/JobItem.php, line 941

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getSiblings() {
  $ids = \Drupal::entityQuery('tmgmt_job_item')
    ->accessCheck(TRUE)
    ->condition('tjiid', $this
    ->id(), '<>')
    ->condition('tjid', $this
    ->getJobId())
    ->execute();
  if ($ids) {
    return static::loadMultiple($ids);
  }
  return FALSE;
}