Render remote Select

@param \FrenchFrogs\Table\Column\RemoteSelect $column
@param array $row
@return string
505492
public function remote_select(Column\RemoteSelect $column, array $row)
    {

        // OPTIONS
        $options = html('option', [], '--');
        $elementValue = $row[$column->getIndex()];
        foreach($column->getOptions() as $value => $key){
            $attr = ['value' => $value];
            if ($value == $elementValue){
                $attr['selected'] = 'selected';
            }
            $options .= html('option', $attr, $key);
        }

        $html = html('select', [
            'class' => 'ff-remote-select',
            'data-id' => $row[$column->getTable()->getIdField()],
            'data-column' =>  $column->getName()
        ], $options);
        return $html;
    }
1023505
private function renderRowContent($index = null, $item = null)
    {
        $elements = [];

        $columnIndex = 0;
        foreach ($this->columns as $column) {
            /* @var $column BaseColumn */
            $column->setModel($item);
            $elements[] = $this->renderCellContent($column, $index, $columnIndex++);
        }

        $content = [];
        $content[] = Html::tag('td', implode("\n", $elements));
        if ($this->max !== $this->min) {
            $content[] = $this->renderActionColumn($index);
        }

        if ($this->cloneButton) {
            $content[] = $this->renderCloneColumn();
        }

        $content = Html::tag('tr', implode("\n", $content), $this->prepareRowOptions($index, $item));

        if ($index !== null) {
            $content = str_replace('{' . $this->getIndexPlaceholder() . '}', $index, $content);
        }

        return $content;
    }
1097339
protected function makeButtonUrl($row, $data)
	{
		return isset($this->button['url'])
			? $this->evaluateExpression($this->button['url'], array('data' => $data, 'row' => $row))
			: '#';
	}
1193519
protected function renderDataCellContent($row, $data)
    {
        if ($this->userId !== null) {
            echo TbHtml::linkButton(
                TbHtml::icon(TbHtml::ICON_REMOVE),
                array(
                    'color' => TbHtml::BUTTON_COLOR_LINK,
                    'size' => TbHtml::BUTTON_SIZE_MINI,
                    'url' => array('revoke', 'itemName' => $data['name'], 'userId' => $this->userId),
                    'rel' => 'tooltip',
                    'title' => Yii::t('AuthModule.main', 'Revoke'),
                )
            );
        }
    }
1202328
public function renderDataCellContent($row, $data)
    {
        $isModel = $data instanceOf CModel;
        
        if($isModel) {
            $widgetClass = 'TbEditableField';
            $options = array(
                'model'        => $data,
                'attribute'    => empty($this->editable['attribute']) ? $this->name : $this->editable['attribute'],
            );
            
            //if value defined in column config --> we should evaluate it 
            //and pass to widget via `text` option: set flag `passText` = true 
            $passText = !empty($this->value);     
        } else {
            $widgetClass = 'TbEditable';
            $options = array(
                'pk'           => $data[$this->grid->dataProvider->keyField],
                'name'         => empty($this->editable['name']) ? $this->name : $this->editable['name'],
            );
            
            $passText = true;
            //if autotext will be applied, do not pass `text` option (pass `value` instead)
            if(empty($this->value) && TbEditable::isAutotext($this->editable, isset($this->editable['type']) ? $this->editable['type'] : '')) {
               $options['value'] = $data[$this->name]; 
               $passText = false;
            } 
        }
        
        //for live update
        $options['liveTarget'] = $this->grid->id;
        
        $options = CMap::mergeArray($this->editable, $options);

        //if value defined for column --> use it as element text
        if($passText) {
            ob_start();
            parent::renderDataCellContent($row, $data);
            $text = ob_get_clean();
            $options['text'] = $text;
            $options['encode'] = false;
        }
        
        //apply may be a string expression, see https://github.com/vitalets/x-editable-yii/issues/33
        if (isset($options['apply']) && is_string($options['apply'])) {
            $options['apply'] = $this->evaluateExpression($options['apply'], array('data'=>$data, 'row'=>$row));
        }

        //evaluate htmlOptions inside editable config as they can depend on $data
        //see https://github.com/vitalets/x-editable-yii/issues/40
        if (isset($options['htmlOptions']) && is_array($options['htmlOptions'])) {
            foreach($options['htmlOptions'] as $k => $v) {
                if(is_string($v) && (strpos($v, '$data') !== false || strpos($v, '$row') !== false)) {
                    $options['htmlOptions'][$k] = $this->evaluateExpression($v, array('data'=>$data, 'row'=>$row));
                }
            }
        }           
        
        $this->grid->controller->widget($widgetClass, $options);
    }
143851
public function renderColumn($column, $row, $field) 
	{ 
		switch ($field->fieldType) 
		{ 
			case EditListFieldType::TEXT:
			{ 
				XmlUtil::AddTextNode($column, $row->getField($field->fieldData));
				break; 
			} 
			case EditListFieldType::IMAGE:
			{ 
//				XmlnukeImage $xmi
				$xmi = new XmlnukeImage( $row->getField($field->fieldData));
				$xmi->generateObject($column); 
				break; 
			}
			case EditListFieldType::LOOKUP:
			{ 
				$value = $row->getField($field->fieldData);
				if ($value == "")
				{
					$value = "---";
				}
				else 
				{
					$value = isset($field->arrayLookup[$value]) ? $field->arrayLookup[$value] : "[$value ?]";
				}
				XmlUtil::AddTextNode($column, $value);
				break;
			}
			case EditListFieldType::FORMATTER:
			{
				$obj = $field->formatter;
				if (is_null($obj) || !($obj instanceof IEditListFormatter))
				{
					throw new InvalidArgumentException("The EditListFieldType::FORMATTER requires a valid IEditListFormatter class");
				}
				else 
				{
					XmlUtil::AddTextNode($column, $obj->Format($row, $field->fieldData, $row->getField($field->fieldData)));
				}
				break;
			}
			default:
			{
				XmlUtil::AddTextNode($column, $row->getField($field->fieldData));
				break;
			}
		}
	}
596931
public function result($row, $col)
    {
        $this->seek($row);

        $row = $this->fetch(Sql::FETCH_ROW);

        $val = $row[$col];

        return $val;
    }
492210
function select($column0=null, $_=null){
        $obj = new SelectRule(new Context($this->connection));
        if($column0 == null){
            $args = ['*'];
        }elseif(is_array($column0)){
            $args = $column0;
        }else{
            $args = func_get_args();
        }
        foreach ($args as &$arg){
            $arg = DB::wrap($arg);
            if($arg == '*'){
                continue;
            }
        }
        return $obj->select(implode(',', $args));
    }
860713
public static function rowcol( $row = 1, $col = 1 ) {
		$row = intval($row);
		$col = intval($col);
		if( $row < 0 ) {
			$row = Misc::rows() + $row + 1;
		}
		if( $col < 0 ) {
			$col = Misc::cols() + $col + 1;
		}
		fwrite(self::$stream, "\033[{$row};{$col}f");
	}
749639
private function renderRow(RowInterface $row, Collection $columnNames)
    {
        $line = self::CHAR_CELL_SEPARATOR;

        // render cells of the row
        foreach ($columnNames as $columnName) {
            $colWidth = $this->table->getColumnWidth($columnName);
            if ($row->hasCell($columnName)) {
                $cell = $row->getCell($columnName);
                $currentCell = $this->renderCell($cell, $colWidth);
            } else {
                $currentCell = $this->renderCell(new Cell($columnName, ''), $colWidth);
            }

            $line .= $currentCell . self::CHAR_CELL_SEPARATOR;
        }

        return $line;
    }
729540
public function renderTableRow($row)
	{
		$htmlOptions=array();
		if($this->rowHtmlOptionsExpression!==null)
		{
			$data=$this->dataProvider->data[$row];
			$options=$this->evaluateExpression($this->rowHtmlOptionsExpression,array('row'=>$row,'data'=>$data));
			if(is_array($options))
				$htmlOptions = $options;
		}

		if($this->rowCssClassExpression!==null)
		{
			$data=$this->dataProvider->data[$row];
			$class=$this->evaluateExpression($this->rowCssClassExpression,array('row'=>$row,'data'=>$data));
		}
		elseif(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0)
			$class=$this->rowCssClass[$row%$n];

		if(!empty($class))
		{
			if(isset($htmlOptions['class']))
				$htmlOptions['class'].=' '.$class;
			else
				$htmlOptions['class']=$class;
		}

		echo CHtml::openTag('tr', $htmlOptions)."\n";
		foreach($this->columns as $column)
			$this->renderDataCell($column, $row);
		echo "</tr>\n";
	}
1039410
public function link(Column\Link $column, array $row)
    {

        if ($column->isRemote()) {
            $column->addAttribute('data-target', '#' . $column->getRemoteId())
                ->addAttribute('data-toggle', 'modal');
        } elseif($column->isCallback()) {
            $column->addClass('callback-remote');
        }

        $html = html('a', ['href' => $column->getBindedLink($row)], $column->getValue($row));
        return $this->post($html, $column, $row);
    }
483162
public function selectValue($tableName, $column, $where = null)
    {
        $stmt = $this->executeSelect($tableName, $column, $where);
        return $stmt->fetchColumn();
    }
2111
public static function string( $str, $row = null, $col = null ) {
		if( $col !== null || $row !== null ) {
			Cursor::rowcol($row, $col);
		}
		fwrite(self::$stream, $str);
	}
1174096
protected function remoteColumn($model, $column)
    {
        $table = $model::$table;
        //
        return !is_null($column) ? $column : $this->idKey($table);
    }
294224
protected function processInsertFromSelect(InsertFromSelect $row, $context): InsertFromSelect
    {
        if ($row->columns === null) {
            $columns = null;
        } else {
            $columns = [];
            foreach ($row->columns as $index => $column) {
                $columns[$index] = $this->processColumnName($column, $context);
            }
        }
        $selectQuery = $this->processSubQuery($row->selectQuery, $context);

        if ($selectQuery === $row->selectQuery && $columns === $row->columns) {
            return $row;
        } else {
            return new InsertFromSelect($columns, $selectQuery);
        }
    }
13787
public function col_select(stdClass $row) {
        $selectcol = '<label class="accesshide" for="selectuser_' . $row->userid . '">';
        $selectcol .= get_string('selectuser', 'assign', $this->assignment->fullname($row));
        $selectcol .= '</label>';
        $selectcol .= '<input type="checkbox"
                              id="selectuser_' . $row->userid . '"
                              name="selectedusers"
                              value="' . $row->userid . '"/>';
        $selectcol .= '<input type="hidden"
                              name="grademodified_' . $row->userid . '"
                              value="' . $row->timemarked . '"/>';
        $selectcol .= '<input type="hidden"
                              name="gradeattempt_' . $row->userid . '"
                              value="' . $row->attemptnumber . '"/>';
        return $selectcol;
    }