Return array of selected block
@param $id string
@return array|string
331177
public function loadBlock($id)
    {
        $block = $this->entityTypeManager->getStorage('block')->load($id);


        return $block ? $this->entityTypeManager->getViewBuilder('block')->view($block) : '';
    }
442369
public function getModifiedData($id)
    {
        $result = [];
        if (isset($this->modified[$id])) {
            foreach (array_keys($this->modified[$id]) as $column) {
                $result[$column] = $this->data[$id][$column];
            }
        }
        return $result;
    }
307935
public function get_by_bit(string $id): ?array
  {
    $t =& $this;
    if ( \bbn\str::is_uid($id) ){
      return $this->db->rselect([
        'table' => $this->class_cfg['table'],
        'fields' => array_map(function($v) use($t){
          return $this->class_cfg['table'].'.'.$v;
        }, array_values($this->class_cfg['arch']['user_options'])),
        'join' => [[
          'table' => $this->class_cfg['tables']['user_options_bits'],
          'on' => [
            'conditions' => [[
              'field' => $this->class_cfg['arch']['user_options_bits']['id_user_option'],
              'exp' => $this->class_cfg['table'].'.'.$this->fields['id']
            ]]
          ]
        ]],
        'where' => [
          $this->class_cfg['tables']['user_options_bits'].'.'.$this->class_cfg['arch']['user_options_bits']['id'] => $id
        ]
      ]);
    }
  }
866650
public function getPage($id)
    {
        $found_page = null;

        foreach ($this->pages as $page) {
            if ($page->id == $id) {
                $found_page = $page;
                break;
            }
        }

        return $found_page;
    }
953198
public function block($id)
    {
        $user = AppUser::find($id);

        if (!$user) {
            return response()->json(null, 404);
        }

        if ($user->isBlock()) {
            return response()->json(null, 204);
        }

        if (!$user->block()) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
562993
public function buildIds(string $id): array
    {
        $ids = [];
        $range = $this->buildRange($id);

        $from = $range->getFrom();
        $to = $range->getTo();
        $step = $range->getStep();
        for ($currentIndex = $from; $currentIndex <= $to; $currentIndex += $step) {
            $ids[
                str_replace(
                    $this->token,
                    $currentIndex,
                    $range->getName()
                )
            ] = $currentIndex;
        }

        return $ids;
    }
1007003
public function getDocumentById(string $id)
    {
        $arguments = $this->getRequestArguments();

        $assignments = [];
        if ($this->settings['paging']['detailPagePaging'] && array_key_exists('underlyingQuery', $arguments)) {
            // If underlying query has been sent, fetch more data to enable paging arrows.
            $underlyingQueryInfo = $arguments['underlyingQuery'];

            $index = FrontendUtility::getIndexes($underlyingQueryInfo);

            foreach ($arguments['underlyingQuery'] as $key => $value) {
                $arguments[$key] = $value;
            }

            $this->createQueryForArguments($arguments);
            $this->query->setStart($index['previousIndex']);
            $this->query->setRows($index['nextIndex'] - $index['previousIndex'] + 1);

            $assignments = $this->getRecordsWithUnderlyingQuery($assignments, $index, $id, $arguments);
        } else {
            // Without underlying query information, just get the record specified.
            $assignments = $this->getTheRecordSpecified($id, $assignments);
        }

        return $assignments;
    }
118346
public function get_links(string $id): ?array
  {
    return $this->_get_links($id, $this->id_user, $this->id_group);
  }
1057895
public function getByOrderId($id)
    {
        $connection = $this->getConnection();
        $select     = $connection->select()->from($this->getMainTable())->where('order_id = :internal_order_id');
        $bind       = [':internal_order_id' => (string) $id];

        return $connection->fetchRow($select, $bind);
    }
1146003
public function exportById($id): array
    {
        $tagGroup = Craft::$app->tags->getTagGroupById((int) $id);

        return $this->export($tagGroup);
    }
303354
public function get($id): ?array
  {
    if ( $this->check() ){
      $d = $this->db->rselect('bbn_observers', [], [
        'id' => $id
      ]);
      if ( !$d['id_alias'] ){
        return $d;
      }
      $alias = $this->db->rselect('bbn_observers', [], [
        'id' => $d['id_alias']
      ]);
      $alias['id'] = $d['id'];
      $alias['result'] = $d['result'];
      $alias['id_alias'] = $d['id_alias'];
      return $alias;
    }
    return null;
  }
498863
public function selectedNodeId($id=null){
        
        if(is_integer($id)){
          $this->selectedid =$id;    
          $this->selectednodeid =$id;    
        }
        return $this->selectedid;
        
    }
805995
public function read($id)
	{
		$tableName = $this->db->parseField($this->tableName);
		$sessionID = $this->db->parseField('session_id');
		$result = $this->db->query(<<<SQL
select * from {$tableName} where {$sessionID} = %s
SQL
,array($id));
		if(isset($result['data']))
		{
			return $result['data'];
		}
		else
		{
			return '';
		}
	}
832940
public function actionBlock($id)
    {
        $user = $this->findModel($id);
        if ($user->getIsBlocked()) {
            $user->unblock();
            Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User has been unblocked'));
        } else {
            $user->block();
            Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User has been blocked'));
        }
        return $this->redirect(Url::previous('actions-redirect'));
    }
507030
public function getById($id)
    {
        $database = DatabaseLayer::getInstance();
        $select = $database->select($this->getTableName(), $this->getTableAlias());
        $select->fields($this->getTableAlias());
        $select->condition($this->getIDField(), $id);
        $results = $select->execute(get_called_class());
        $result = end($results);
        return $result;
    }
1370685
public function get($id = null) {
		if (empty($id)) {
			return false;
		}

		$fields = [
			$this->alias . '.id',
			$this->alias . '.value',
		];
		$blockExists = $this->hasField('block');
		if ($blockExists) {
			$fields[] = $this->alias . '.block';
		}
		$conditions = [$this->alias . '.id' => $id];
		$this->recursive = -1;

		return $this->find('first', compact('fields', 'conditions'));
	}
1290834
protected function doContains($id)
    {
        $found = false;
        $this->delegate->get($id, null, $found);
        return $found;
    }