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 MenuItem

This class describes the MenuItem model

Hawk\Model uses Hawk\Utils
Extended by Hawk\MenuItem
Namespace: Hawk
Package: BaseModels
Located at models/MenuItem.php

Methods summary

public
# __construct( array $data = array() )

Constructor

Constructor

Parameters

$data
The data to set on the instance properties

Overrides

Hawk\Model::__construct
public static array
# getAvailableItems( Hawk\User $user = null )

Get the items available for a specific user

Get the items available for a specific user

Parameters

$user
The user. If not set, the current session user is set

Returns

array
The list of items
public static Hawk\MenuItem
# add( array $data )

Add a new item in the database

Add a new item in the database

Parameters

$data
The item data to insert

Returns

Hawk\MenuItem
The created item

Overrides

Hawk\Model::add
public static Hawk\MenuItem
# getByName( string $name )

Find a menu item by it name, formatted as "."

Find a menu item by it name, formatted as "."

Parameters

$name
The item name

Returns

Hawk\MenuItem
The found item
public static array
# getPluginMenuItems( string $plugin )

Get all the menu items of a plugin

Get all the menu items of a plugin

Parameters

$plugin
The plugin to get

Returns

array
public true
# delete( )

Delete the menu item

Delete the menu item

Returns

true
if the data has been sucessfully removed from the database, false in other cases

Overrides

Hawk\Model::delete

Methods inherited from Hawk\Model

addIfNotExists(), countElementsByExample(), countElementsBySQL(), deleteByExample(), deleteBySQL(), getAll(), getByExample(), getById(), getBySQL(), getData(), getDbInstance(), getDbName(), getListByExample(), getListBySQL(), getPrimaryColumn(), getTable(), save(), set(), setDbName(), setPrimaryColumn(), setTable(), update()

Methods used from Hawk\Utils

debug(), getSerializedVersion(), map()

Constants summary

integer USER_ITEM_ID

The id of the user menu

The id of the user menu

# 1
integer ADMIN_ITEM_ID

The id of the admin menu

The id of the admin menu

# 2

Properties summary

public static sting $tablename

The associated table

The associated table

# "MenuItem"
protected static string $primaryColumn

The primary column

The primary column

# 'id'
public string $label

The menu item label

The menu item label

# ''

Properties inherited from Hawk\Model

$dbname

Hawk - PHP documentation API documentation generated by ApiGen