original_string: public function getSiblings($role, $primaryOnly = false)
      {
          $primaryField = $this->getPrimaryField($role);
          $parentObject = $this->owner->parentObject;
          $childObject = $this->owner->childObject;
          if (empty($childObject)) {
              return [];
          }
          $relationFields = [];
          if ($primaryOnly) {
              $relationFields['{{%alias%}}.[[' . $primaryField . ']]'] = 1;
          }
  
          return $childObject->siblingRelationQuery($parentObject, ['where' => $relationFields], ['disableAccess' => true])->all();
      }
code: public function getSiblings($role, $primaryOnly = false)
      {
          $primaryField = $this->getPrimaryField($role);
          $parentObject = $this->owner->parentObject;
          $childObject = $this->owner->childObject;
          if (empty($childObject)) {
              return [];
          }
          $relationFields = [];
          if ($primaryOnly) {
              $relationFields['{{%alias%}}.[[' . $primaryField . ']]'] = 1;
          }
  
          return $childObject->siblingRelationQuery($parentObject, ['where' => $relationFields], ['disableAccess' => true])->all();
      }
code_tokens: public function getSiblings ( $ role , $ primaryOnly = false ) { $ primaryField = $ this -> getPrimaryField ( $ role ) ; $ parentObject = $ this -> owner -> parentObject ; $ childObject = $ this -> owner -> childObject ; if ( empty ( $ childObject ) ) { return [ ] ; } $ relationFields = [ ] ; if ( $ primaryOnly ) { $ relationFields [ '{{%alias%}}.[[' . $ primaryField . ']]' ] = 1 ; } return $ childObject -> siblingRelationQuery ( $ parentObject , [ 'where' => $ relationFields ] , [ 'disableAccess' => true ] ) -> all ( ) ; }
docstring: Get siblings.
  
  @param [[@doctodo param_type:role]] $role        [[@doctodo param_description:role]]
  @param boolean                      $primaryOnly [[@doctodo param_description:primaryOnly]] [optional]
  
  @return [[@doctodo return_type:getSiblings]] [[@doctodo return_description:getSiblings]]
docstring_tokens: Get siblings .