public function getMappingByNameAndBranch($name, $branch_id) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', self::TYPE)
      ->condition('name', $name)
      ->condition('field_branch_ct_reference', $branch_id)
      ->execute();

    if (!$ids) {
      return NULL;
    }

    $ids = reset($ids);
    return $this->storageMapping->load($ids);
  }
public function getMappingByNameAndBranch($name, $branch_id) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', self::TYPE)
      ->condition('name', $name)
      ->condition('field_branch_ct_reference', $branch_id)
      ->execute();

    if (!$ids) {
      return NULL;
    }

    $ids = reset($ids);
    return $this->storageMapping->load($ids);
  }
public function getMappingByNameAndBranch ( $ name , $ branch_id ) { $ ids = $ this -> queryFactory -> get ( 'mapping' ) -> condition ( 'type' , self :: TYPE ) -> condition ( 'name' , $ name ) -> condition ( 'field_branch_ct_reference' , $ branch_id ) -> execute ( ) ; if ( ! $ ids ) { return NULL ; } $ ids = reset ( $ ids ) ; return $ this -> storageMapping -> load ( $ ids ) ; }
Get mapping by name and branch ID.

@param string $name
Name.
@param int $branch_id
Branch ID.

@return \Drupal\openy_mappings\Entity\Mapping
Mapping entity.
Get mapping by name and branch ID .