Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • App
  • ButtonInput
  • Cache
  • CheckboxInput
  • ColorInput
  • Conf
  • Controller
  • Crypto
  • DatabaseSessionHandler
  • DatetimeInput
  • DB
  • DBExample
  • DeleteInput
  • Dialogbox
  • EmailInput
  • ErrorHandler
  • Event
  • FileInput
  • FileSystem
  • FloatInput
  • Form
  • FormFieldset
  • FormInput
  • GenericModel
  • GifImage
  • HawkApi
  • HawkUpdater
  • HiddenInput
  • HtmlInput
  • HTTPRequest
  • Icon
  • Image
  • IntegerInput
  • ItemList
  • ItemListField
  • JpegImage
  • Lang
  • Language
  • LeftSidebarTab
  • Less
  • Logger
  • Mail
  • MenuItem
  • Model
  • NoSidebarTab
  • NumberInput
  • ObjectInput
  • Option
  • Panel
  • PasswordInput
  • Permission
  • Plugin
  • PluginInstaller
  • PngImage
  • ProfileQuestion
  • ProfileQuestionValue
  • RadioInput
  • Request
  • Response
  • RightSidebarTab
  • Role
  • RolePermission
  • Route
  • Router
  • SelectInput
  • Session
  • Singleton
  • SubmitInput
  • Tabs
  • TextareaInput
  • TextInput
  • Theme
  • TimeInput
  • Upload
  • User
  • View
  • ViewPlugin
  • Widget
  • WysiwygInput

Traits

  • Utils

Exceptions

  • AppStopException
  • DBExampleException
  • DBException
  • FileSystemException
  • HawkApiException
  • ImageException
  • MailException
  • UploadException
  • ViewException

Class ItemList

This class is used to generate and display smart lists, getting data from the database or a given array

Hawk\ItemList uses Hawk\Utils
Namespace: Hawk
Package: List
Located at ItemList.php

Methods summary

public
# __construct( arary $params )

Constructor

Constructor

Parameters

$params
The parameter of the list
public array
# get( )

Get the data to display

Get the data to display

Returns

array
The data to display
public
# set( array $data )

Set the list data

Set the list data

Parameters

$data
The data to set
public string
# __toString( )

Display the list (alias)

Display the list (alias)

Returns

string
The HTML result of displaying
public string
# display( )

Display the list

Display the list

Returns

string
The HTML result of displaying
public
# isRefreshing( )

Check if the list is refreshing or displayed for the first time

Check if the list is refreshing or displayed for the first time

Methods used from Hawk\Utils

debug(), getSerializedVersion(), map()

Constants summary

string DEFAULT_MODEL
# '\StdClass'
string ALL_LINES
# 'all'
integer DEFAULT_LINE_CHOICE
# 20

Properties summary

public static array $lineChoice

The possible choices for the number of lines to display

The possible choices for the number of lines to display

# array(10, 20, 50, 100)
public string $id

The list id

The list id

#
public array $controls

The list control buttons

The list control buttons

# array()
public array $fields

The list fields. This corresponds to the properties of each column in the list

The list fields. This corresponds to the properties of each column in the list

# array()
public array $searches

The user researches in the list

The user researches in the list

# array()
public array $sorts

The user sorts

The user sorts

# array()
public array $binds

The binded values for the SQL queries

The binded values for the SQL queries

# array()
public integer $lines

The number of lines to display

The number of lines to display

# Hawk\ItemList::DEFAULT_LINE_CHOICE
public integer $page

The page number to display

The page number to display

# 1
public string $action

The URI called to refresh the list

The URI called to refresh the list

#
public string $model

The model used to get the data in the database

The model used to get the data in the database

# Hawk\ItemList::DEFAULT_MODEL
public string $table

The table where to get the data if "model" is not set

The table where to get the data if "model" is not set

#
public string $reference

The default reference field, used to index the list result table

The default reference field, used to index the list result table

#
public string $filter

The list filter

The list filter

#
public string $dbname

The default db instance name

The default db instance name

# MAINDB
public array $data

The raw data to display in the list (overrides table, model, dbname and reference properties)

The raw data to display in the list (overrides table, model, dbname and reference properties)

# null
public array $group

The fields group in the search query

The fields group in the search query

# array()
public mixed $selected

The id of the selected line

The id of the selected line

# null
public string|function $lineClass

The class to apply to the list lines

The class to apply to the list lines

# null
public boolean $navigation

Defines if the navigation bar of the list must be displayed

Defines if the navigation bar of the list must be displayed

# true
public boolean $noHeader

If set to true, the columns headers are not displayed

If set to true, the columns headers are not displayed

# false
public string $target

If not empty, define the CSS selector of the node where to display the list refreshing result

If not empty, define the CSS selector of the node where to display the list refreshing result

# ''
public string $emptyMessage

Define the message to display if no result are found for the list

Define the message to display if no result are found for the list

#
public string $tpl

The whole list (list + navigation bar) view filename

The whole list (list + navigation bar) view filename

#
public string $navigationBarTpl

The navigation bar view filename

The navigation bar view filename

#
public string $listTpl

The list view filename

The list view filename

#
public string $resultTpl

The result view filename

The result view filename

#
Hawk - PHP documentation API documentation generated by ApiGen