Find checkbox element.

@param string $id        element identifier
@param array  $relations tag relations (near, in, under)

@return Accessor\Form\CheckboxAccessor
182055
public function findCheckbox($id = null, array $relations = array())
    {
        return new Accessor\Form\CheckboxAccessor($id, $relations, $this->con);
    }
241062
public function whereRelations(array $relations)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereRelations($relations);

        return $instance;
    }
410802
public function checkbox( $name_id, $checked = false )
    {
        $el = $this->element( 'input', $name_id, 'checkbox' )
            ->value( 1 )
            ->attribute( 'checked', $checked ? 'checked' : null );
        return $el;
    }
426494
public static function find($id)
    {
        self::init();
        $query = 'SELECT * FROM ' . self::$modelTable . ' WHERE id = '.$id;
        $qb = new QueryBuilder(self::$connect, $query);
        $rows = $qb->get();
        $collection = self::makeCollection($rows);
        return !empty($collection) ? array_shift($collection) : null;
    }
1343518
public function findSpan($id = null, array $relations = array())
    {
        return new Accessor\SpanAccessor($id, $relations, $this->con);
    }
447314
public function findId($id, $data = [])
    {
        if ($id) {
            $this->findOneById($id);
        } else {
            // Reset status when record not found
            $this->isNew = true;
        }

        return $this->fromArray($data);
    }
444934
public function findHidden($id = null, array $relations = array())
    {
        return new Accessor\Form\HiddenAccessor($id, $relations, $this->con);
    }
492249
public function find($id, $columns = ['*'])
    {
        return is_array($id) ? $this->findMany($id, $columns) : $this->where(
            $this->getRelated()->getQualifiedKeyName(), '=', $id
        )->first($columns);
    }
766140
public function find($id, $attributes = ['*'])
    {
        return $this->executeCallback(get_called_class(), __FUNCTION__, func_get_args(), function () use ($id, $attributes) {
            return $this->prepareQuery($this->createModel())->find($id, $attributes);
        });
    }
718101
private function findSlotById(string $id, array $slots)
    {
        $slot = null;
        foreach($slots as $s){
            $slot_id = $s['id'] ?? null;
            if ($slot_id == $id){
                $slot = $s;
                break;
            }
        }
        return $slot;
    }
1370874
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', trim($ids));
        }

        return $this->createQueryBuilder('o')
            ->where('o.id IN (:ids)')
            ->setParameters([
                'ids' => $ids,
            ])
            ->getQuery()
            ->getResult();
    }
620897
public function getParents ($relationIdentifier, $id, $inputQuery = null)
		{
			return $this->getChildren($relationIdentifier, $id, $inputQuery);
		}
695366
public function findSubmit($id = null, array $relations = array())
    {
        return new Accessor\Form\SubmitAccessor($id, $relations, $this->con);
    }
933322
protected function findExistingRelationIds($checkIds = null)
    {
        $foreignKeyName = $this->relationModel->getQualifiedKeyName();

        $results = $this->relationObject
            ->getBaseQuery()
            ->select($foreignKeyName);

        if ($checkIds !== null && is_array($checkIds) && count($checkIds)) {
            $results = $results->whereIn($foreignKeyName, $checkIds);
        }

        return $results->lists($foreignKeyName);
    }
231817
protected function _findInChildren(array $element, $id, $withParents, array &$parents)
    {
        if ($element['id'] == $id) {
            return $element;
        }
        foreach ($element['children'] as $child) {
            if ($child['id'] == $id) {
                if ($withParents) {
                    $parents[] = $element;
                }
                return $child;
            }
            if (null !== ($found = $this->_findInChildren($child, $id, $withParents, $parents))) {
                if ($withParents) {
                    $parents[] = $element;
                }
                return $found;
            }
        }
    }
541504
private function getRelations(Repository $repository, array $relations = [])
    {
        // if we have relation array passed, ignore request input
        if (count($relations) === 0) {
            $relations = Input::get('with');

            if (!is_array($relations)) {
                $relations = $this->inputService->decode('with');
            }
        }

        $result = [];
        $repo_relations = $repository->relations();
        foreach ($relations as $key => $value) {
            if (in_array($key, $repo_relations)) {
                $result[] = $key;
            } elseif (in_array($value, $repo_relations)) {
                $result[] = $value;
            }
        }

        return $result;
    }
1259459
public function with($relations = [])
    {
        if (! is_array($relations)) {
            $relations = [$relations];
        }

        $this->with = $relations;

        return $this;
    }