Traq\Models\Project::componentSelectOptions PHP Method

componentSelectOptions() public method

public componentSelectOptions ( ) : array[]
return array[]
    public function componentSelectOptions()
    {
        $options = [];
        $components = Component::where('project_id = ?')->setParameter(0, $this->id)->orderBy('name', 'ASC');
        foreach ($components->execute()->fetchAll() as $component) {
            $options[] = ['label' => $component['name'], 'value' => $component['id']];
        }
        return $options;
    }