Overview

Namespaces

  • Composer
    • Autoload
  • Illuminate
    • Support
      • Contracts
      • Facades
  • Laravella
    • Crud
      • Exceptions
      • Facades
  • None
  • PHP

Classes

  • ComposerAutoloaderInit0812ead62c33200f1cfc491b452f7c6a
  • CreateActionsTable
  • CreateAssetsTable
  • CreateAuditTable
  • CreateDisplayTypesTable
  • CreateEventsTable
  • CreateFieldsTable
  • CreateKeyFieldsTable
  • CreateKeysTable
  • CreateKeyTypesTable
  • CreateLogsTable
  • CreateMenuPermissionsTable
  • CreateMenusTable
  • CreateObjectEventsTable
  • CreateObjectsTable
  • CreateOptionsTable
  • CreateOptionTypesTable
  • CreatePageAssetsTable
  • CreatePagesTable
  • CreateSeveritiesTable
  • CreateTablesTable
  • CreateUserGroupPermissionsTable
  • CreateUsergroupsTable
  • CreateUserPermissionsTable
  • CreateViewsTable
  • CreateWidgetTypesTable
  • DbApiController
  • DbController
  • Domain
  • field
  • foreignKey
  • Model
  • PageController
  • primaryKey
  • Record
  • Relation
  • Table
  • xxxxAddMcollectionMediaTable
  • xxxxCreateUsersTable

Functions

  • action
  • app
  • app_path
  • array_add
  • array_build
  • array_divide
  • array_dot
  • array_except
  • array_fetch
  • array_first
  • array_flatten
  • array_forget
  • array_get
  • array_only
  • array_pluck
  • array_pull
  • array_set
  • array_sort
  • asset
  • base_path
  • camel_case
  • class_basename
  • csrf_token
  • dd
  • e
  • ends_with
  • head
  • last
  • link_to
  • link_to_action
  • link_to_asset
  • link_to_route
  • object_get
  • public_path
  • route
  • secure_asset
  • secure_url
  • snake_case
  • starts_with
  • storage_path
  • str_contains
  • str_finish
  • str_is
  • str_plural
  • str_random
  • str_singular
  • studly_case
  • trans
  • trans_choice
  • url
  • value
  • with
  • Overview
  • Namespace
  • Class
  • Tree

Class DbController

All database requests are handled by this controller, even the DbApiController ones, although DbApiController is leaner on the response i.e. json.

Controller
Extended by DbController

Direct known subclasses

DbApiController, PageController
Located at src/controllers/DbController.php
Methods summary
protected
# log( type $severity, type $message )

Parameters

$severity
type
$severity
$message
type
$message
public type
# getLog( )

Getter for $log

Getter for $log

Returns

type
public
# getSkin( )
public type
# getLayout( type $type = 'admin' )

Parameters

$type
type
$type Either 'admin' or 'frontend'

Returns

type
public type
# getIndex( )

The root of the crud application /db

The root of the crud application /db

Returns

type
public type
# getAdmin( )

The root of the crud application /db

The root of the crud application /db

Returns

type
public
# getPage( type $page )

Parameters

$page
type
$page
protected
# __getView( type $tableName, type $action )

Find the right view to use with the action

Find the right view to use with the action

Parameters

$tableName
type
$tableName
$action
type
$action
protected
# __getSlug( type $slug )

Find the right object and view to use with the page slug

Find the right object and view to use with the page slug

Parameters

$slug
type
$tableName
protected type
# __getTableActionView( type $tableName, type $viewId, type $action )

Get a record from _db_pages as an stdClass object

Get a record from _db_pages as an stdClass object

Parameters

$tableName
type
$tableName
$viewId
type
$viewId
$action
type
$action

Returns

type
protected
# __getPermissions( type $tableName, type $action )

Check permissions

Check permissions

Parameters

$tableName
type
$tableName
$action
type
$action
public type
# getSelect( type $tableName = null, mixed $message = "" )

/db/select/{tablename}

/db/select/{tablename}

Parameters

$tableName
type
$table
$message

Returns

type
protected
# __indexByPk( mixed $array, mixed $pkFieldName )

Index an array of records (of type StdClass) according to the pk value

Index an array of records (of type StdClass) according to the pk value

protected
# __indexByValue( mixed $array, mixed $fieldName )

Index an array of records according to the value of $fieldName

Index an array of records according to the value of $fieldName

protected
# __attachRelatedData( mixed $records, mixed $ma )
protected array
# __attachPkData( type $records, type $ma )

Parameters

$records
type
$records
$ma
type
$ma

Returns

array
public type
# getSearch( type $tableName = null, mixed $q = null )

Handle a search request and display it in the select view

Handle a search request and display it in the select view

Parameters

$tableName
type
$tableName
$q

Returns

type
protected Laravella\Crud\Params
# __makeParams( type $status, type $message, type $data, mixed $tableName, mixed $action )

Create a standard params object that will be passed to the view. The params object (instance of Laravella\Crud\Params is at the heart of every view and contains all the variables that will be passed to the view, from the DbController.

Create a standard params object that will be passed to the view. The params object (instance of Laravella\Crud\Params is at the heart of every view and contains all the variables that will be passed to the view, from the DbController.

Data is not fetched yet, use data->get(), or data->paginate() to fetch

Parameters

$status
type
$data
$message
type
$tableName
$data
type
$action
$tableName
$action

Returns

Laravella\Crud\Params
public type
# getDelete( type $tableName = null, type $recorid = null )

Delete a record

Delete a record

Parameters

$tableName
type
$tableName
$recorid
type
$recorid

Returns

type
public type
# getInsert( type $tableName = null )

Prompt user to insert a new record

Prompt user to insert a new record

Parameters

$tableName
type
$table

Returns

type
public type
# getEdit( type $tableName = null, type $pkValue = 0 )

Display a single record on screen to be edited by the user

Display a single record on screen to be edited by the user

Parameters

$tableName
type
$table
$pkValue
type
$pkValue

Returns

type
public type
# postEdit( type $tableName = null, type $pkValue = null )

Update data to the database

Update data to the database

Parameters

$tableName
type
$tableName
$pkValue
type
$id

Returns

type
public
# postInsert( mixed $tableName )

Insert a new record into $tableName

Insert a new record into $tableName

protected
# __getPkSelects( type $meta )

Loop through foreign keys and generate an array of select boxes for each related primary key

Loop through foreign keys and generate an array of select boxes for each related primary key

Parameters

$meta
type
$meta
protected
# __getSelect( mixed $table, mixed $valueField, mixed $textField )

Get a select array(object(value, text))

Get a select array(object(value, text))

protected type
# _customAction( type $parameters )

This is for custom front-end actions that simply needs the Params object and defines it's own view via the table_action_view table

This is for custom front-end actions that simply needs the Params object and defines it's own view via the table_action_view table

Parameters

$parameters
type
$parameters

Returns

type
public
# getTest( )
public string
# missingMethod( type $parameters )

If method is not found

If method is not found

Parameters

$parameters
type
$parameters

Returns

string
Constants summary
string SUCCESS "success"
#
string INFO "info"
#
string IMPORTANT "important"
#
string HTML "text/html"
#
string XML "text/xml"
#
string JSON "text/json"
#
Properties summary
public string $displayType DbController::HTML
#
crud API documentation generated by ApiGen 2.8.0