コード例 #1
0
ファイル: Index.php プロジェクト: gauthierm/pinhole
    /**
     * Gets photographer data
     *
     * @return SwatTableModel with photographer information.
     */
    protected function getTableModel(SwatView $view)
    {
        $sql = 'select * from PinholePhotographer
			where instance %s %s
			order by %s';
        $instance_id = $this->app->getInstanceId();
        $sql = sprintf($sql, SwatDB::equalityOperator($instance_id), $this->app->db->quote($instance_id, 'integer'), $this->getOrderByClause($view, 'id'));
        $rs = SwatDB::query($this->app->db, $sql);
        foreach ($rs as $row) {
            $row->status_title = PinholePhotographer::getStatusTitle($row->status);
        }
        return $rs;
    }
コード例 #2
0
ファイル: Edit.php プロジェクト: gauthierm/pinhole
 protected function buildInternal()
 {
     parent::buildInternal();
     $this->ui->getWidget('status')->addOptionsByArray(PinholePhotographer::getStatuses());
 }