BelongsToManyThrough::getResult

@return array|bool|\O2System\Framework\Models\Sql\DataObjects\Result\Row
197702
public function getResult()
    {
        if ($this->map->currentModel->row instanceof Sql\DataObjects\Result\Row) {
            $criteria = $this->map->currentModel->row->offsetGet($this->map->currentPrimaryKey);
            $field = $this->map->currentTable . '.' . $this->map->currentPrimaryKey;

            $this->map->referenceModel->qb
                ->select([
                    $this->map->referenceTable . '.*',
                ])
                ->join($this->map->currentTable, implode(' = ', [
                    $this->map->currentTable . '.' . $this->map->currentPrimaryKey,
                    $this->map->intermediaryTable . '.' . $this->map->intermediaryCurrentForeignKey,
                ]))
                ->join($this->map->referenceTable, implode(' = ', [
                    $this->map->referenceTable . '.' . $this->map->referencePrimaryKey,
                    $this->map->intermediaryTable . '.' . $this->map->intermediaryReferenceForeignKey,
                ]));

            if ($result = $this->map->intermediaryModel->find($criteria, $field)) {
                return $result;
            }
        }

        return false;
    }
877542
public function getResultados()
    {
        if (!$this->esResultadoDTE())
            return false;
        // si no hay respustas se deben crear
        if (!$this->respuesta_documentos) {
            // si no está creado el arrelgo con los datos error
            if (!$this->arreglo) {
                return false;
            }
            // crear repuestas a partir del arreglo
            $Resultados = $this->arreglo['RespuestaDTE']['Resultado']['ResultadoDTE'];
            if (!isset($Resultados[0]))
                $Resultados = [$Resultados];
            foreach ($Resultados as $Resultado) {
                $this->respuesta_documentos[] = $Resultado;
            }
        }
        // entregar recibos
        return $this->respuesta_documentos;
    }
20678
public function getResults()
    {
        $list = (array) $this->parent->getAttributeFromArray($this->localKey);
        $result = [];

        foreach ($list as $index => $item) {
            $result[$index] = $model = $this->related->newInstance([], true);
            $model->setId($index);
        }

        return collect($result);
    }
275084
public function getResults()
    {
        $results = array();

        $this->debugStart();

        $executeResults = $this->executeGetResults();

        $this->debugStop();

        foreach ($executeResults as $result) {
            $r = $this->getResult($result);
            if ($r != null) {
                $results[] = $r;
            }
        }

        return $results;
    }
811055
public function getResultsAction()
    {
        $datatable = $this->get('olix_security.datatable.user');
        $datatable->buildDatatable(array(
            'entity' => $this->container->getParameter('fos_user.model.user.class'),
            'delay'  => $this->container->getParameter('olix.security.activity.delay'),
        ));
        
        $query = $this->get('sg_datatables.query')->getQueryFrom($datatable);
        
        return $query->getResponse();
    }
927262
public function getRelated()
	{
		if($this->parent->getRawColumnValue($this->getForeignKey()) === null)
		{
			return false;
		}

		return $this->first();
	}
344708
protected function getOneRow()
    {
        if (null === $this->cols) {
            $result = $this->statement->result_metadata();
            if (false === $result) return false;

            $this->cols = [];

            // set column name
            foreach ($result->fetch_fields() as $col) {
                $this->cols[] = $col->name;
            }

            // bind values
            $this->vals = array_fill(0, count($this->cols), null);

            $refs = [];
            foreach ($this->vals as $i => &$f) {
                $refs[$i] = &$f;
            }
            call_user_func_array([$this->statement, 'bind_result'], $refs);
        }

        if ($this->statement->fetch()) {
            $row = [];
            foreach($this->cols as $i => $col) {
                $row[$col] = $this->vals[$i];
            }
            return $row;
        }

        return false;
    }
1066031
final public function getResult($result = '')
    {
        $result.= $this->generate();
        if ($this->successor !== null) {
            return $this->successor->getResult($result);
        }

        return $result;
    }
1097369
public function getResults()
    {
        return ! is_null($this->farParent->{$this->localKey})
                ? $this->get()
                : $this->related->newCollection();
    }
579014
public function query()
    {
        $result = parent::query();
        if( $this->resultClass ) {
            $result->setResultClass($this->getResultClass());
            $result->setResultParams($this->getResultParams());
        }
        return $result;
    }
423206
public function getResults()
    {
        if (! is_array($this->foreignKey)) {
            if (is_null($this->child->{$this->foreignKey})) {
                return $this->getDefaultFor($this->parent);
            }
        }

        return $this->query->first() ?: $this->getDefaultFor($this->parent);
    }
171721
public function getResults()
    {
        $skip = ($this->page-1)*$this->limit;
        
        $cursor = $this->getCursor();
        $cursor->skip($skip);

        $results = array();
        $i = 0;

        while($cursor->valid() && $cursor->current() && $i++ < $this->limit) {

            $object = new $this->modelName();
            $object->writeAttributes($cursor->current());

            $pseudoCursor = new \stdClass();
            foreach ($object as $key => $value) {
                $pseudoCursor->$key = $value;
            }

            $results[] = $pseudoCursor;
            $cursor->skip();
        }

        return $results;
    }
260161
protected function _getRow()
    {
        if (!isset($this->_row)) {
            $model = $this->getOwnModel();
            if (!$model) return null;
            $dbId = $this->getData()->dbId;
            $sharedDataClass = self::getFlag($this->getData()->componentClass, 'sharedDataClass');
            if ($sharedDataClass) {
                $component = $this->getData();
                while ($component) {
                    if (is_instance_of($component->componentClass, $sharedDataClass))
                        $dbId = $component->dbId;
                    $component = $component->parent;
                }
            }

            $this->_row = $model->getRow($dbId);
            if (!$this->_row) {
                $this->_row = $model->createRow();
                $this->_row->component_id = $dbId;
            }
        }
        return $this->_row;
    }
1031637
public function getResults()
    {
        if (! is_array($this->getParentKey())) {
            if (is_null($this->getParentKey())) {
                return $this->getDefaultFor($this->parent);
            }
        }

        return $this->query->first() ?: $this->getDefaultFor($this->parent);
    }
1196885
protected function results()
    {
        $results = [];
        
        if (is_array($this->data)) {
            if ($this->singleMode) {
                if ($this->singleModeBottom) {
                    if (isset($this->data[0])) {
                        return [$this->singleResult($this->data[0], $this->singleMode)];
                    }
                }
            } else {
                foreach ($this->data as $data) {
                    $results[] = $this->singleResult($data, $this->singleMode);
                }
            }
        }
        
        return $results;
    }
1311621
public function getResults()
    {
        if ($this->_children === null) {
            $this->_children = $this->getFreshResults();
        }
        return $this->_children;
    }
633280
public function getValidationResults()
    {
        $results = new Result();

        foreach ($this as $argument) {
            $argumentValidationResults = $argument->getValidationResults();
            if ($argumentValidationResults === null) {
                continue;
            }

            $results
                ->forProperty($argument->getName())
                ->merge($argumentValidationResults);
        }

        return $results;
    }