Get actions column for table builder.

@return callable
432986
protected function getDetailsActionsColumn()
    {
        return function ($row) {
            $btns    = [];
            $html    = app('html');
            $circles = [];
            foreach ([1, 2, 3] as $index) {
                array_push($circles, $html->create('i', '', ['class' => 'fa fa-circle']));
            }
            $section    = $html->create('div', $html->create('section', $html->create('ul', $html->raw(implode('', $btns)))), ['class' => 'mass-actions-menu'])->get();
            $indicators = $html->create('i', $html->raw(implode('', $circles)), ['class' => 'ma-trigger'])->get();
            return $html->raw(implode('', [$section, $indicators]))->get();
        };
    }
831663
protected function getActionsAsArrays()
    {
        $actions = [];

        foreach ($this->getActions() as $action) {
            $actions[] = $action->toArray();
        }

        return $actions;
    }
1324647
protected function getSelectColumnsSQL()
    {
        // Create the column list fragment only once
        if ($this->currentPersisterContext->selectColumnListSql !== null) {
            return $this->currentPersisterContext->selectColumnListSql;
        }

        $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r');

        $columnList = [];

        // Add columns
        foreach ($this->class->getDeclaredPropertiesIterator() as $fieldName => $property) {
            if ($property instanceof FieldMetadata) {
                $columnList[] = $this->getSelectColumnSQL($fieldName, $property->getDeclaringClass());

                continue;
            }

            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
                continue;
            }

            $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

            foreach ($property->getJoinColumns() as $joinColumn) {
                /** @var JoinColumnMetadata $joinColumn */
                $referencedColumnName = $joinColumn->getReferencedColumnName();

                if (! $joinColumn->getType()) {
                    $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                }

                $columnList[] = $this->getSelectJoinColumnSQL($joinColumn);
            }
        }

        // Add discriminator column (DO NOT ALIAS, see AbstractEntityInheritancePersister#processSQLResult).
        $discrColumn      = $this->class->discriminatorColumn;
        $discrTableAlias  = $this->getSQLTableAlias($discrColumn->getTableName());
        $discrColumnName  = $discrColumn->getColumnName();
        $discrColumnType  = $discrColumn->getType();
        $resultColumnName = $this->platform->getSQLResultCasing($discrColumnName);
        $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());

        $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
        $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);

        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);

        // sub tables
        foreach ($this->class->getSubClasses() as $subClassName) {
            $subClass = $this->em->getClassMetadata($subClassName);

            // Add columns
            foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) {
                if ($subClass->isInheritedProperty($fieldName)) {
                    continue;
                }

                switch (true) {
                    case $property instanceof FieldMetadata:
                        $columnList[] = $this->getSelectColumnSQL($fieldName, $subClass);
                        break;

                    case $property instanceof ToOneAssociationMetadata && $property->isOwningSide():
                        $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

                        foreach ($property->getJoinColumns() as $joinColumn) {
                            /** @var JoinColumnMetadata $joinColumn */
                            $referencedColumnName = $joinColumn->getReferencedColumnName();

                            if (! $joinColumn->getType()) {
                                $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                            }

                            $columnList[] = $this->getSelectJoinColumnSQL($joinColumn);
                        }

                        break;
                }
            }
        }

        $this->currentPersisterContext->selectColumnListSql = implode(', ', $columnList);

        return $this->currentPersisterContext->selectColumnListSql;
    }
1228693
public function ExistingColumns() {
      if($this->_ExistingColumns === NULL) {
         if($this->TableExists())
            $this->_ExistingColumns = $this->Database->SQL()->FetchTableSchema($this->_TableName);
         else
            $this->_ExistingColumns = array();
      }
      return $this->_ExistingColumns;
   }
216464
public function getColumns()
    {
        $columns = [];

        foreach ($this->columns as $field => $fieldTitle) {
            if (in_array($field, $this->model->getFillable())) {
                if (!$field) {
                    $field = $fieldTitle;
                    $fieldTitle = Str::title($fieldTitle);
                }
                $columns[$field] = $fieldTitle;
                continue;
            }

            // We can replace this with data_get() I believe.
            if (($methodBreaker = strpos($field, '.')) !== false) {
                $method = substr($field, 0, $methodBreaker);
                if (method_exists($this->model, $method)) {
                    if (method_exists($this->model->$method(), $submethod = str_replace($method.'.', '', $field))) {
                        $this->model->$method()->$submethod();

                        $columns[$field] = $fieldTitle;
                        continue;
                    }
                }
            }

            if (is_numeric($field)) {
                $field = $fieldTitle;
                $fieldTitle = Str::title($fieldTitle);
            }

            $columns[$field] = $fieldTitle;
        }

        if (count($columns)) {
            return $columns;
        }

        return [$this->model->getKeyName() => $this->model->getKeyName()];
    }
94502
private function _getColumns()
    {
        $columns = [];
        foreach ($this->_config['columns'] as $data) {
            $columns[] = new Column($data, $this->_config['view_name']);
        }
        return $columns;
    }
498926
public function listAction()
    {
        $source = new Entity($this->get('opifer.form.post_manager')->getClass());

        $formColumn = new TextColumn(['id' => 'posts', 'title' => 'Form', 'source' => false, 'filterable' => false, 'sortable' => false, 'safe' => false]);
        $formColumn->manipulateRenderCell(function ($value, $row, $router) {
            return '<a href="'.$this->generateUrl('opifer_form_form_edit', ['id'=> $row->getEntity()->getForm()->getId()]).'">'.$row->getEntity()->getForm()->getName().'</a>';
        });

        $viewAction = new RowAction('view', 'opifer_form_post_view');
        $viewAction->setRouteParameters(['id']);

        $deleteAction = new RowAction('delete', 'opifer_form_post_delete');
        $deleteAction->setRouteParameters(['id']);

        $grid = $this->get('grid');
        $grid->setId('posts')
            ->setSource($source)
            ->setDefaultOrder('id', 'desc')
            ->addColumn($formColumn, 2)
            ->addRowAction($viewAction)
            ->addRowAction($deleteAction);

        return $grid->getGridResponse('OpiferCmsBundle:Backend/Post:list.html.twig');
    }
713231
protected function buildColumns() {
		$select = [];
		$params = [];
		if(!$this->columns)
			return ['*', []];
		else {
			foreach($this->columns as $alias=>$column) {
				if($column instanceof static) {
					$sql = $column->buildSQL();
					$params = array_merge($params, $column->getParameters());
					$select[] = '('.$sql.') AS '.$this->identifierQuotes($alias);
				}
				elseif($column instanceof Raw) {
					$sql = $column->getSQL();
					$params = array_merge($params, $column->getParameters());
					$select[] = $sql.' AS '.$this->identifierQuotes($alias);
				}
				elseif((string)$alias !== (string)$column)
					$select[] = $this->identifierQuotes($column).' AS '.$this->identifierQuotes($alias);
				else
					$select[] = $this->identifierQuotes($column);
			}
		}
		return [implode(', ', $select), $params];
	}
159158
public function getMappableColumns()
    {
        if (!empty($this->mappableFields)) {
            return $this->mappableFields;
        }
        $scaffolded = $this->scaffoldMappableFields();
        if (!empty($this->transforms)) {
            $transformables = array_keys($this->transforms);
            $transformables = array_combine($transformables, $transformables);
            $scaffolded = array_merge($transformables, $scaffolded);
        }
        natcasesort($scaffolded);

        return $scaffolded;
    }
808965
public function visibleColumns()
    {
        $visible = array_filter(explode(',', request(Tools\ColumnSelector::SELECT_COLUMN_NAME)));

        if (empty($visible)) {
            return $this->columns;
        }

        array_push($visible, '__row_selector__', '__actions__');

        return $this->columns->filter(function (Column $column) use ($visible) {
            return in_array($column->getName(), $visible);
        });
    }
678498
public function getActions() {
        $actions = array();
        foreach ($this->class->getMethods(ReflectionMethod::IS_PUBLIC) as $m) {
            if ($m->isConstructor() || $m->isDestructor() || in_array($m->name, self::$BLACK_LIST)) {
                continue;
            }

            if (is_subclass_of($m->class, 'Module') || is_subclass_of($m->class, Controller::class)) {
                $actions[] = new ActionDescription($m);
            }
        }
        return $actions;
    }
486486
public function getColumns()
	{
		$columns = $this->builder()->queryWithBinding(Expressions::getColumns($this->tableName))->get()->all();

		$_columns = [];

		foreach($columns as $column) {
			$_columns[] = Repository::getPlatformColumn($column);
		}

		return $_columns;
	}
211209
public function getColumnAliases( )
	{
		return array_map_val( $this->getColumns(), function()
		{
			$column = func_get_arg( 0 );
			$alias = $column[2] === null ? $column[1] : $column[2];
			return $alias;
		} );
	}
885086
protected function getActionsColumn()
    {
        return function ($row) {
            $btn = [];
            $btn[] = app('html')->link(
                handles("orchestra::users/{$row->id}/edit"),
                trans('orchestra/foundation::label.edit'),
                [
                    'class' => 'btn btn-xs btn-label btn-warning',
                    'role' => 'edit',
                    'data-id' => $row->id,
                ]
            );

            if (! is_null($this->user) && $this->user->id !== $row->id) {
                $btn[] = app('html')->link(
                    handles("orchestra::users/{$row->id}"),
                    trans('orchestra/foundation::label.delete'),
                    [
                        'class' => 'btn btn-xs btn-label btn-danger',
                        'role' => 'delete',
                        'data-id' => $row->id,
                        'data-method' => 'DELETE',
                    ]
                );
            }

            return app('html')->create(
                'div',
                app('html')->raw(implode('', $btn)),
                ['class' => 'btn-group']
            );
        };
    }
1112650
public function tableListAction() {
		$this->getConsoleRequest();
		
		$status = [
			- 1 => 'None',
			0 => 'Outdated',
			1 => 'Ok'];
		$bm = new BuilderManager($this->getNameManager());
		
		$body = '';
		while ( $bm->nextTable() ) {
			$body .= $bm->getTableName() . "\n";
			$body .= "\tDataTable     :" . $status[$bm->existsDataTable()] . "\n";
			$body .= "\tEntityAbstract:" . $status[$bm->existsEntityAbstract()] . "\n";
			$body .= "\tEntity        :" . $status[$bm->existsEntity()] . "\n";
		}
		$footer = $this->getDeveloperFooter();
		$response = <<<MBODY
Listing of tables
$body
$footer
MBODY;
		return "$response\n";
	}
384150
public function columns()
    {
        $this->hook->filter(
            'manage_users_columns',
            [$this->user->getColumns(), 'setNames']
        )->dispatch();

        $this->hook->action(
            'manage_users_custom_column',
            function ($value, $name, $id) {
                ob_start();

                $column = $this->user->getColumn($name);

                if (isset($column)) {
                    $column->render($id);
                }

                return ob_get_clean();
            },
            ['numberOfArguments' => 3]
        )->dispatch();
    }
477466
public function setKeyAction(): ColumnInterface
    {
        $this->key = self::ACTION_NAME;
        $this->setValue('');
        $this->setSort(false);
        $this->setScreening(true);

        return $this;
    }