Object_Model Class Reference

Describes a single object from livestatus. More...

Inheritance diagram for Object_Model:
BaseObject_Model BaseAuthModule_Model BaseDashboard_Model BaseNotification_Model BasePermissionQuark_Model BaseRecurringDowntime_Model BaseSavedFilter_Model BaseSavedReport_Model BaseSetting_Model BaseTestClassA_Model BaseTestClassB_Model BaseUser_Model BaseUserGroup_Model NaemonObject_Model Widget_Model

Public Member Functions

 get_custom_variables ()
 Get a list of custom variables related to the object, if possible.
 mayi_resource ()
 Get mayi resource for the current object.
 list_commands ($auth_filtered=true)
 Get a list of commands related to the object This digs out the information from orm_command_doctags, which is generated from the Ninja rule: orm_command tags in corresponding classes.
 get_readable_name ()
 Get a readable name of the current object.
 get_current_user ()
 Get the current logged in username.
 get_permission_quark ()
 Get a quark for the current object.

Static Public Member Functions

static rewrite_columns ()
 Mine out rewrite columns from doctags.
static list_commands_static ($auth_filtered=true)
 Get a list of commands related to the object This digs out the information from orm_command_doctags, which is generated from the Ninja rule: orm_command tags in corresponding classes.

Detailed Description

Describes a single object from livestatus.


Member Function Documentation

Object_Model::get_current_user (  ) 

Get the current logged in username.

Returns:
string
Object_Model::get_custom_variables (  ) 

Get a list of custom variables related to the object, if possible.

Returns:
array

Reimplemented in BaseContact_Model, BaseHost_Model, and BaseService_Model.

Object_Model::get_permission_quark (  ) 

Get a quark for the current object.

Returns:
integer
Object_Model::get_readable_name (  ) 

Get a readable name of the current object.

As fallback, which is valid in many cases, is the key string. But for tables with ID-keys, it might be nice to have a better string representation.

Returns:
string

Reimplemented in SavedFilter_Model, Comment_Model, Downtime_Model, and Service_Model.

Object_Model::list_commands ( auth_filtered = true  ) 

Get a list of commands related to the object This digs out the information from orm_command_doctags, which is generated from the Ninja rule: orm_command tags in corresponding classes.

Parameters:
$auth_filtered bool true if filtered by permission, false otherwise
Returns:
array
static Object_Model::list_commands_static ( auth_filtered = true  )  [static]

Get a list of commands related to the object This digs out the information from orm_command_doctags, which is generated from the Ninja rule: orm_command tags in corresponding classes.

This doesn't set if the command is enabled or not, but just the enable criteria. Thus enable is depednent of the current object

Parameters:
$auth_filtered bool true if filtered by permission, false otherwise
Returns:
array
Object_Model::mayi_resource (  ) 

Get mayi resource for the current object.

This is a wrapper to get the resource from the set

static Object_Model::rewrite_columns (  )  [static]

Mine out rewrite columns from doctags.

TODO: Don't do string magic in runtime... That's slow However... in this case, it's not that often...

Reimplemented from BaseObject_Model.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1