Content Management System

Template Functions

Twig template functions

Component

Render html component

{{ component(name,{ params },type) }}
Property Type Description Default
name string required Html component name
params array optional Component parameters
type string optional Component type (arikaim, html, static)
Url

Site url

{{ url(path, full, language) }}
Property Type Description Default
path string optional Url path
bool full optional Full or relative url.
language string optional Lnguage code
currentUrl

Current page url

{{ currentUrl(full) }}
Property Type Description Default
bool full optional Full or relative url.
loadLibraryFile

Load UI library file

{{ loadLibraryFile(name, fileName) }}
Property Type Description Default
string name required UI Library name.
string fileName required UI Library file name.
getLanguage

Get current page language.

{{ getLanguage() }}
Property Type Description Default
paginate

Create paginator.

{{ paginate(source, namespace, ) }}
Property Type Description Default
object|array|json source required Data source
string|null namespace optional Paginator namespace
int|null pageSize optional Page size
int|null currentPage optional Current page.
clearPaginator

Clear saved paginator.

{{ clearPaginator(namespace) }}
Property Type Description Default
string|null namespace required Paginator namespace
getPaginator

Get saved paginator.

{{ getPaginator(namespace) }}
Property Type Description Default
string|null namespace required Paginator namespace
getRowsPerPage

Get rows per page.

{{ getRowsPerPage(namespace) }}
Property Type Description Default
string|null namespace required Paginator namespace
getViewType

Get view type.

{{ getViewType(namespace, default) }}
Property Type Description Default
string|null namespace required Paginator namespace
string|null default optinal Default view type
applySearch

Apply search fields to db query builder.

{{ applySearch(queryBuilder, namespace) }}
Property Type Description Default
Builder|Model queryBuilder required Laravel ORM Query Builder or Db Model
string|null namespace required Search fields namespace
createSearch

Create search filed and save to session.

{{ createSearch(queryBuilder, namespace) }}
Property Type Description Default
string field required Db table column name
string|null namespace optinal Search fields namespace
string|null operator optinal Search operator
string|null queryOperator optinal Search query operator
mixed searchFieldName optinal Search field name
searchValue

Get search value.

{{ searchValue(field, namespace, default) }}
Property Type Description Default
string field required Search field name.
string|null namespace optinal Search fields namespace
mixed default optinal Search operator
getSearch

Get saved search.

{{ getSearch(namespace) }}
Property Type Description Default
string|null namespace optinal Search fields namespace
getOrderBy

Get saved order by fields list.

{{ getOrderBy(namespace) }}
Property Type Description Default
string|null namespace optinal OrderBy fields namespace
applyOrderBy

Apply OrderBy to db query builder or model.

{{ applyOrderBy(queryBuilder, namespace) }}
Property Type Description Default
Builder|model queryBuilder required Laravel ORM query builder
string|null namespace optinal OrderBy fields namespace
createModel

Create Laravel ORM db model instance.

{{ createModel(class, extensionName, showError) }}
Property Type Description Default
string class required Model class name
string|null extensionName optinal Extension name
bool showError optinal Show error.
showSql

Show query builder sql.

{{ showSql(builder) }}
Property Type Description Default
Builder builder required Laravel ORm query builder
getFileType

Get file type.

{{ getFileType(fileName) }}
Property Type Description Default
string fileName required File name.
service

Get service instance from service container.

{{ service(name) }}
Property Type Description Default
string name required Service instance name.