You are here

public function JobItem::getSiblings in Translation Management Tool 8

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 923

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

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