Deal_Model
extends Core_Entity
in package
Deal_Model
Tags
Table of Contents
Properties
- $config : mixed
- ORM config
- $counterparty : mixed
- Counterparty
- $events : int
- Events
- $_allowedTags : array<string|int, mixed>
- Allowed tags. If list of tags is empty, all tags will show.
- $_attributes : array<string|int, mixed>
- Entity Attributes
- $_belongsTo : array<string|int, mixed>
- Belongs to relations
- $_changeCopiedName : bool
- Change copied name is necessary, default FALSE
- $_changedColumns : array<string|int, mixed>
- List of changed columns
- $_dataValues : array<string|int, mixed>
- data-values, e.g. dataMyValue
- $_forbiddenTags : array<string|int, mixed>
- Forbidden tags. If list of tags is empty, all tags will show.
- $_hasMany : array<string|int, mixed>
- One-to-many or many-to-many relations
- $_hasOne : array<string|int, mixed>
- One-to-one relations
- $_hasRevisions : mixed
- Has revisions
- $_marksDeleted : mixed
- Marks deleted entity
- $_modelColumns : array<string|int, mixed>
- List of columns in model with values
- $_modelName : mixed
- Model name, e.g. 'book' for 'Book_Model'
- $_nameColumn : string
- Column consist item's name
- $_preloadValues : array<string|int, mixed>
- List of preloaded values those will set for new object which does not have primary key
- $_primaryKey : string
- Primary key
- $_propertyValues : array<string|int, mixed>
- Values of all properties of user
- $_queryBuilder : Core_QueryBuilder_Select
- Select query builder
- $_shortcodeTags : array<string|int, mixed>
- List of Shortcodes tags
- $_showXmlAttachments : bool
- Show files data in XML
- $_showXmlCurrency : bool
- Show currency data in XML
- $_showXmlDealSiteusers : bool
- Show deal siteusers data in XML
- $_showXmlEvents : bool
- Show events data in XML
- $_showXmlNotes : bool
- Show notes data in XML
- $_showXmlProperties : bool
- Show properties in XML
- $_showXmlShopItems : bool
- Show shop items data in XML
- $_showXmlSiteuser : bool
- Show siteuser data in XML
- $_skipColumns : array<string|int, mixed>
- List of skipped columns from table
- $_sorting : array<string|int, mixed>
- Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
- $_tableColumns : array<string|int, mixed>
- List of columns in table
- $_tableName : mixed
- Table name, e.g. 'books' for 'Book_Model'
- $_typicalForbiddenTags : array<string|int, mixed>
- Typical forbidden tags.
- $_xmlSortPropertiesValues : mixed
- Sort properties values in XML
Methods
- __call() : mixed
- Triggered when invoking inaccessible methods in an object context
- __construct() : mixed
- Constructor.
- add() : self
- Add related object. If main object does not save, it will save.
- addAllowedTag() : self
- Add tag to allowed tags list
- addAllowedTags() : self
- Add tags to allowed tags list
- addAttribute() : self
- Add entity attribute
- addEntities() : self
- Add children entities
- addEntity() : self
- Add a children entity
- addForbiddenTag() : self
- Add tag to forbidden tags list
- addForbiddenTags() : self
- Add tags to forbidden tags list
- addXmlTag() : self
- Add external tag for entity
- applyMarksDeleted() : self
- Apply markDeleted flag if is set
- changeCopiedName() : self
- Set if change copied name is necessary
- changed() : bool
- Check model has been changed.
- changeStep() : object
- Перевод сделки на другой этап
- check() : self
- Check model values. If model has incorrect value, one will correct or call exception.
- checkAccess2DealTemplateStep() : bool
- Проверка доступности для сотрудника перевода сделки на новый этап
- checkBackendAccess() : bool
- Check user access to admin form action
- checkPermission2Create() : bool
- Проверка права сотрудника на создание сделки с переводом ее на данный этап
- checkPermission2Delete() : bool
- Проверка права сотрудника на удаление сделки, находящейся на данном этапе
- checkPermission2Edit() : bool
- Проверка права сотрудника на редактирование сделки
- checkPermission2StepConversion() : bool
- Проверка права сотрудника на перевод сделки на другой этап
- checkPermission2View() : bool
- Проверка права сотрудника на просмотр сделки, находящейся на данном этапе
- chunk() : bool
- Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
- clear() : self
- Clear object
- clearEntities() : self
- Clear enities
- clearEntitiesAfterGetXml() : self
- Clear all entities after XML generation
- clearXmlTags() : mixed
- Clear external XML tags for entity.
- copy() : new
- Copy object
- counterpartyBackend() : string
- Backend callback method
- create() : self
- Insert new object data into database
- createDir() : self
- Create message files directory
- deadlineBackend() : string
- Backend callback method
- deal_template_idBackend() : string
- Backend callback method
- delete() : Core_Entity
- Delete object from database
- deleteAll() : self
- Delete all object
- deleteDir() : self
- Delete message files directory
- deleteFile() : self
- Delete message attachment file
- factory() : mixed
- Create and return an object of model
- find() : self
- Find object in database and load one. Use clear() before find() with conditions!
- findAll() : array<string|int, mixed>
- Find all objects
- getAllowedTags() : array<string|int, mixed>
- Get allowed tags list
- getChangedData() : array<string|int, mixed>
- Get changed columns with values
- getClassName() : string
- Get Model CallsName
- getCompletedSteps() : array<string|int, mixed>
- Пройденные этапы сделки
- getCount() : int|false
- Get count object
- getCurrentDealStepUsers() : array<string|int, mixed>
- Get Deal_Step_User for current step
- getDatabaseDriver() : string
- Get name of Database Driver
- getDataValues() : array<string|int, mixed>
- Get dataValues
- getEndDatetime() : string
- Get end datetime
- getEntities() : array<string|int, mixed>
- Get children entities
- getFieldIDs() : array<string|int, mixed>
- Get visible field's IDs
- getFields() : array<string|int, mixed>
- Get field's values
- getFirst() : null|Core_ORM
- Get fist entity, ordered by primary key
- getForbiddenTags() : array<string|int, mixed>
- Get forbidden tags list
- getHref() : string
- Get message files href
- getJoinedUsers() : array<string|int, mixed>
- Получение списка сотрудников, выполняющих сделку, исключая создателя и ответственного
- getLast() : null|Core_ORM
- Get last entity, ordered by primary key
- getMarksDeleted() : string
- Get column name for marks deleted
- getModelName() : string
- Get model name, e.g. 'book' for 'Book_Model'
- getName() : string
- Get entity name
- getNameColumn() : string
- Get Name Column
- getPath() : string
- Get path for files
- getPermissions() : int
- Получение прав доступа сотрудника к этапу сделки
- getPreviousCompletedStep() : Deal_Template_Step|null
- Предыдущий этап сделки
- getPrimaryKey() : mixed
- Get primary key value
- getPrimaryKeyName() : string
- Get primary key name
- getPropertyValues() : array<string|int, mixed>
- Values of all properties of structure node Значения всех свойств узла структуры
- getRelatedSite() : Site_Model|null
- Get Related Site
- getRelations() : array<string|int, mixed>
- Get $this->_relations
- getResponsibleUsers() : array<string|int, mixed>
- Get responsible users
- getStartDatetime() : string
- Get start datetime
- getStdObject() : stdObject
- Get stdObject for entity and children entities
- getTableColumns() : array<string|int, mixed>
- Get tableColumns
- getTableColums() : array<string|int, mixed>
- Get table columns. Fix wrong method name
- getTableName() : string
- Get table name
- getTrashDescription() : string
- Get entity description
- getUsersByPermissions() : array<string|int, mixed>
- Получение списка сотрудников, обладающих заданными правами доступа к сделке 2 - редактирование, 4 - просмотр, 8 - удаление
- getXml() : string
- Get XML for entity and children entities
- getXmlTagName() : string
- Get tag name
- getXmlTags() : array<string|int, mixed>
- Get external XML tags for entity.
- isCallable() : bool
- Verify that the contents of a variable can be called as a function
- isEmptyPrimaryKey() : bool
- Check is primary key NULL
- markDeleted() : Core_Entity
- Mark entity as deleted
- nameBackend() : string
- Backend callback method
- notifyBotsChangeTemplateStep() : self
- Notify Bots
- profitBackend() : string
- Backend callback method
- pushHistory() : self
- Push history
- queryBuilder() : Core_QueryBuilder_Select
- Get query builder for select
- remove() : self
- Remove related object. If main object does not save, it will save.
- removeAllowedTag() : self
- Remove tag from allowed tags list
- removeForbiddenTag() : self
- Remove tag from forbidden tags list
- save() : self
- Save object. Uses self::update() or self::create()
- sendChangeStepNotifications() : self
- Отправка уведомлений о изменений этапа сделки
- setCheck() : self
- Set _check flag
- setDatabaseDriver() : mixed
- Set name of Database Driver
- setMarksDeleted() : self
- Set column name for marks deleted
- setRelations() : self
- Set $this->_relations
- setXmlTagName() : self
- Set name of XML node
- showCrmProjects() : string
- Show crm project badge
- showPerspective() : string
- Show perspective bar
- showType() : string
- Show type badge
- showXmlAttachments() : self
- Show files in XML
- showXmlCurrency() : self
- Show currency in XML
- showXmlDealSiteusers() : self
- Show deal siteusers in XML
- showXmlEvents() : self
- Show events in XML
- showXmlNotes() : self
- Show notes in XML
- showXmlProperties() : self
- Show properties in XML
- showXmlShopItems() : self
- Show shop items in XML
- showXmlSiteuser() : self
- Show siteuser in XML
- start_datetimeBackend() : string
- Backend callback method
- statusBackend() : string
- Backend callback method
- toArray() : array<string|int, mixed>
- Convert Object to Array
- undelete() : self
- Turn off deleted status
- update() : self
- Update object data into database
- updateKanban() : array<string|int, mixed>
- Update kanban
- _getCopiedName() : mixed
- Get the name of a new copied object
- _isTagAvailable() : bool
- Is $tagName Available
- _prepareData() : self
- Prepare entity and children entities
- _preparePropertyValue() : mixed
- Prepare Property Value
- getDatabase() : Core_DataBase
- Get Database
Properties
$config
ORM config
public
static mixed
$config
= \NULL
$counterparty
Counterparty
public
mixed
$counterparty
= \NULL
$events
Events
public
int
$events
= 0
$_allowedTags
Allowed tags. If list of tags is empty, all tags will show.
protected
array<string|int, mixed>
$_allowedTags
= array()
$_attributes
Entity Attributes
protected
array<string|int, mixed>
$_attributes
= array()
$_belongsTo
Belongs to relations
protected
array<string|int, mixed>
$_belongsTo
= array(
'company' => array(),
// не было
'deal_template_step' => array(),
'deal_template' => array(),
'creator' => array('foreign_key' => 'creator_id', 'model' => 'user'),
'user' => array(),
'siteuser' => array(),
'shop_currency' => array(),
'shop' => array(),
'site' => array(),
'crm_project' => array(),
)
$_changeCopiedName
Change copied name is necessary, default FALSE
protected
bool
$_changeCopiedName
= \FALSE
$_changedColumns
List of changed columns
protected
array<string|int, mixed>
$_changedColumns
= array()
$_dataValues
data-values, e.g. dataMyValue
protected
array<string|int, mixed>
$_dataValues
= array()
$_forbiddenTags
Forbidden tags. If list of tags is empty, all tags will show.
protected
array<string|int, mixed>
$_forbiddenTags
= array('deleted', 'creator_id', 'user_id', 'site_id', 'deadline', 'start_datetime', 'end_datetime')
$_hasMany
One-to-many or many-to-many relations
protected
array<string|int, mixed>
$_hasMany
= array(
'deal_step' => array(),
'deal_event' => array(),
'event' => array('through' => 'deal_event'),
// 'deal_note' => array(),
'deal_document' => array(),
'deal_attachment' => array(),
'deal_shop_item' => array(),
'shop_item' => array('through' => 'deal_shop_item'),
'deal_siteuser' => array(),
'deal_history' => array(),
'deal_crm_note' => array(),
'crm_note' => array('through' => 'deal_crm_note'),
'dms_document' => array('through' => 'deal_dms_document'),
'deal_dms_document' => array(),
)
$_hasOne
One-to-one relations
protected
array<string|int, mixed>
$_hasOne
= array()
// Relation one-to-one for Book-Comment:
protected $_hasOne = array('comment' => array());
// Equivalence relation one-to-one for Book-Comment with detailed conditions:
// comment - Model name
// foreign_key - Foreign key
protected $_hasOne = array('comment' => array(
'foreign_key' => 'book_id'
));
$_hasRevisions
Has revisions
protected
mixed
$_hasRevisions
= \FALSE
$_marksDeleted
Marks deleted entity
protected
mixed
$_marksDeleted
= 'deleted'
$_modelColumns
List of columns in model with values
protected
array<string|int, mixed>
$_modelColumns
= array()
$_modelName
Model name, e.g. 'book' for 'Book_Model'
protected
mixed
$_modelName
= \NULL
$_nameColumn
Column consist item's name
protected
string
$_nameColumn
= 'name'
$_preloadValues
List of preloaded values those will set for new object which does not have primary key
protected
array<string|int, mixed>
$_preloadValues
= array()
$_primaryKey
Primary key
protected
string
$_primaryKey
= 'id'
$_propertyValues
Values of all properties of user
protected
array<string|int, mixed>
$_propertyValues
= \NULL
$_queryBuilder
Select query builder
protected
Core_QueryBuilder_Select
$_queryBuilder
= \NULL
$_shortcodeTags
List of Shortcodes tags
protected
array<string|int, mixed>
$_shortcodeTags
= array()
$_showXmlAttachments
Show files data in XML
protected
bool
$_showXmlAttachments
= \FALSE
$_showXmlCurrency
Show currency data in XML
protected
bool
$_showXmlCurrency
= \FALSE
$_showXmlDealSiteusers
Show deal siteusers data in XML
protected
bool
$_showXmlDealSiteusers
= \FALSE
$_showXmlEvents
Show events data in XML
protected
bool
$_showXmlEvents
= \FALSE
$_showXmlNotes
Show notes data in XML
protected
bool
$_showXmlNotes
= \FALSE
$_showXmlProperties
Show properties in XML
protected
bool
$_showXmlProperties
= \FALSE
$_showXmlShopItems
Show shop items data in XML
protected
bool
$_showXmlShopItems
= \FALSE
$_showXmlSiteuser
Show siteuser data in XML
protected
bool
$_showXmlSiteuser
= \FALSE
$_skipColumns
List of skipped columns from table
protected
array<string|int, mixed>
$_skipColumns
= array()
$_sorting
Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
protected
array<string|int, mixed>
$_sorting
= array()
$_tableColumns
List of columns in table
protected
array<string|int, mixed>
$_tableColumns
= array()
$_tableName
Table name, e.g. 'books' for 'Book_Model'
protected
mixed
$_tableName
= \NULL
$_typicalForbiddenTags
Typical forbidden tags.
protected
array<string|int, mixed>
$_typicalForbiddenTags
= array()
$_xmlSortPropertiesValues
Sort properties values in XML
protected
mixed
$_xmlSortPropertiesValues
= \TRUE
Methods
__call()
Triggered when invoking inaccessible methods in an object context
public
__call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
-
method name
- $arguments : array<string|int, mixed>
-
arguments
__construct()
Constructor.
public
__construct([int $id = NULL ]) : mixed
Parameters
- $id : int = NULL
-
entity ID
add()
Add related object. If main object does not save, it will save.
public
add(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
- $model : Core_ORM
- $relation : string = NULL
Tags
Return values
selfaddAllowedTag()
Add tag to allowed tags list
public
addAllowedTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
selfaddAllowedTags()
Add tags to allowed tags list
public
addAllowedTags(array<string|int, mixed> $aTags) : self
Parameters
- $aTags : array<string|int, mixed>
-
array of tags
Return values
selfaddAttribute()
Add entity attribute
public
addAttribute(string $name, string $value) : self
Parameters
- $name : string
- $value : string
Return values
selfaddEntities()
Add children entities
public
addEntities(array<string|int, mixed> $aChildrenEntities) : self
Parameters
- $aChildrenEntities : array<string|int, mixed>
Return values
selfaddEntity()
Add a children entity
public
addEntity(Core_Entity $oChildrenEntity) : self
Parameters
- $oChildrenEntity : Core_Entity
Return values
selfaddForbiddenTag()
Add tag to forbidden tags list
public
addForbiddenTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
selfaddForbiddenTags()
Add tags to forbidden tags list
public
addForbiddenTags(array<string|int, mixed> $aTags) : self
Parameters
- $aTags : array<string|int, mixed>
-
array of tags
Return values
selfaddXmlTag()
Add external tag for entity
public
addXmlTag(string $tagName, string $tagValue[, array<string|int, mixed> $attributes = array() ]) : self
Parameters
- $tagName : string
-
tag name
- $tagValue : string
-
tag value
- $attributes : array<string|int, mixed> = array()
-
attributes
Return values
selfapplyMarksDeleted()
Apply markDeleted flag if is set
public
applyMarksDeleted() : self
Return values
selfchangeCopiedName()
Set if change copied name is necessary
public
changeCopiedName(bool $changeCopiedName) : self
Parameters
- $changeCopiedName : bool
-
mode
Return values
selfchanged()
Check model has been changed.
public
changed() : bool
Return values
boolchangeStep()
Перевод сделки на другой этап
public
changeStep(int $newStepId[, string $sDealStepComment = '' ]) : object
Parameters
- $newStepId : int
-
new step id
- $sDealStepComment : string = ''
-
comment
Return values
objectcheck()
Check model values. If model has incorrect value, one will correct or call exception.
public
check([bool $exception = FALSE ]) : self
$object = Core_ORM::factory('Book', 1);
$object->value = 123;
$object->check(TRUE)->save();
Parameters
- $exception : bool = FALSE
-
Call exception (TRUE) or correct value (FALSE). Default FALSE.
Return values
selfcheckAccess2DealTemplateStep()
Проверка доступности для сотрудника перевода сделки на новый этап
public
checkAccess2DealTemplateStep(int $newStepId, User_Model $oUser) : bool
Parameters
- $newStepId : int
-
new step id
- $oUser : User_Model
Return values
boolcheckBackendAccess()
Check user access to admin form action
public
checkBackendAccess(string $actionName, User_Model $oUser) : bool
Parameters
- $actionName : string
-
admin form action name
- $oUser : User_Model
-
user object
Return values
boolcheckPermission2Create()
Проверка права сотрудника на создание сделки с переводом ее на данный этап
public
checkPermission2Create(User_Model $oUser) : bool
Parameters
- $oUser : User_Model
Return values
boolcheckPermission2Delete()
Проверка права сотрудника на удаление сделки, находящейся на данном этапе
public
checkPermission2Delete(User_Model $oUser) : bool
Parameters
- $oUser : User_Model
Return values
boolcheckPermission2Edit()
Проверка права сотрудника на редактирование сделки
public
checkPermission2Edit(User_Model $oUser) : bool
Parameters
- $oUser : User_Model
Return values
boolcheckPermission2StepConversion()
Проверка права сотрудника на перевод сделки на другой этап
public
checkPermission2StepConversion(int $iNewStepId, User_Model $oUser) : bool
Parameters
- $iNewStepId : int
-
new step id
- $oUser : User_Model
Return values
boolcheckPermission2View()
Проверка права сотрудника на просмотр сделки, находящейся на данном этапе
public
checkPermission2View(User_Model $oUser) : bool
Parameters
- $oUser : User_Model
Return values
boolchunk()
Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
public
chunk(int $count, callable $callback[, bool $bCache = TRUE ]) : bool
Parameters
- $count : int
-
chunk size
- $callback : callable
- $bCache : bool = TRUE
-
use cache
Return values
boolclear()
Clear object
public
clear() : self
Return values
selfclearEntities()
Clear enities
public
clearEntities() : self
Return values
selfclearEntitiesAfterGetXml()
Clear all entities after XML generation
public
clearEntitiesAfterGetXml([bool $clear = TRUE ]) : self
Parameters
- $clear : bool = TRUE
-
mode
Return values
selfclearXmlTags()
Clear external XML tags for entity.
public
clearXmlTags() : mixed
copy()
Copy object
public
copy() : new
Tags
Return values
new —copied object
counterpartyBackend()
Backend callback method
public
counterpartyBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
stringcreate()
Insert new object data into database
public
create() : self
Tags
Return values
selfcreateDir()
Create message files directory
public
createDir() : self
Return values
selfdeadlineBackend()
Backend callback method
public
deadlineBackend(mixed $oAdmin_Form_Field, mixed $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : mixed
- $oAdmin_Form_Controller : mixed
Return values
stringdeal_template_idBackend()
Backend callback method
public
deal_template_idBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
stringdelete()
Delete object from database
public
delete([mixed $primaryKey = NULL ]) : Core_Entity
Parameters
- $primaryKey : mixed = NULL
-
primary key for deleting object
Return values
Core_EntitydeleteAll()
Delete all object
public
deleteAll([bool $bCache = TRUE ][, int $limit = 100 ]) : self
Parameters
- $bCache : bool = TRUE
-
use cache
- $limit : int = 100
-
default 100
Core_ORM::factory('Book')->Comments->deleteAll();
Return values
selfdeleteDir()
Delete message files directory
public
deleteDir() : self
Return values
selfdeleteFile()
Delete message attachment file
public
deleteFile( $deal_attachment_id) : self
Parameters
Return values
selffactory()
Create and return an object of model
public
static factory( $modelName[, $primaryKey = NULL ]) : mixed
Parameters
find()
Find object in database and load one. Use clear() before find() with conditions!
public
find([mixed $primaryKey = NULL ][, bool $bCache = TRUE ]) : self
Parameters
- $primaryKey : mixed = NULL
-
default NULL
- $bCache : bool = TRUE
-
use cache
// Find an object and load (without lazy load) // If an object is not found, primary key sets NULL $oBook = Core_ORM::factory('Book')->find(1);
Return values
selffindAll()
Find all objects
public
findAll([bool $bCache = TRUE ]) : array<string|int, mixed>
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
// Find objects $aBooks = Core_ORM::factory('Book')->findAll(); foreach ($aBooks as $oBook) { var_dump($oBook->id); }
Tags
Return values
array<string|int, mixed>getAllowedTags()
Get allowed tags list
public
getAllowedTags() : array<string|int, mixed>
Return values
array<string|int, mixed>getChangedData()
Get changed columns with values
public
getChangedData() : array<string|int, mixed>
Return values
array<string|int, mixed>getClassName()
Get Model CallsName
public
static getClassName( $modelName) : string
Parameters
Return values
stringgetCompletedSteps()
Пройденные этапы сделки
public
getCompletedSteps() : array<string|int, mixed>
Return values
array<string|int, mixed>getCount()
Get count object
public
getCount([bool $bCache = TRUE ][, string $fieldName = '*' ][, bool $distinct = FALSE ]) : int|false
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
- $fieldName : string = '*'
-
default '*'
- $distinct : bool = FALSE
-
default FALSE
Return values
int|false —
$iCount = Core_ORM::factory('Book')->getCount();
var_dump($iCount);
getCurrentDealStepUsers()
Get Deal_Step_User for current step
public
getCurrentDealStepUsers() : array<string|int, mixed>
Return values
array<string|int, mixed>getDatabaseDriver()
Get name of Database Driver
public
static getDatabaseDriver() : string
Return values
stringgetDataValues()
Get dataValues
public
getDataValues() : array<string|int, mixed>
Return values
array<string|int, mixed>getEndDatetime()
Get end datetime
public
getEndDatetime() : string
Return values
stringgetEntities()
Get children entities
public
getEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>getFieldIDs()
Get visible field's IDs
public
getFieldIDs() : array<string|int, mixed>
Return values
array<string|int, mixed>getFields()
Get field's values
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getFirst()
Get fist entity, ordered by primary key
public
getFirst([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
Return values
null|Core_ORM —
$mObject = Core_ORM::factory('Book')->getFirst();
if (!is_null($mObject))
{
echo $mObject;
}
getForbiddenTags()
Get forbidden tags list
public
getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed>getHref()
Get message files href
public
getHref() : string
Return values
stringgetJoinedUsers()
Получение списка сотрудников, выполняющих сделку, исключая создателя и ответственного
public
getJoinedUsers([int $dealStepOffset = 0 ]) : array<string|int, mixed>
Parameters
- $dealStepOffset : int = 0
-
смещение относительно текущего этапа (0 - текущий этап, 1 - предыдущий этап и т.д.). По умолчанию 0, т.е. подразумевается текущий этап сделки
Return values
array<string|int, mixed>getLast()
Get last entity, ordered by primary key
public
getLast([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
Return values
null|Core_ORM —
$mObject = Core_ORM::factory('Book')->getLast();
if (!is_null($mObject))
{
echo $mObject;
}
getMarksDeleted()
Get column name for marks deleted
public
getMarksDeleted() : string
Return values
stringgetModelName()
Get model name, e.g. 'book' for 'Book_Model'
public
getModelName() : string
Return values
stringgetName()
Get entity name
public
getName() : string
Tags
Return values
stringgetNameColumn()
Get Name Column
public
getNameColumn() : string
Return values
stringgetPath()
Get path for files
public
getPath() : string
Return values
stringgetPermissions()
Получение прав доступа сотрудника к этапу сделки
public
getPermissions(User_Model $oUser) : int
Parameters
- $oUser : User_Model
Return values
intgetPreviousCompletedStep()
Предыдущий этап сделки
public
getPreviousCompletedStep() : Deal_Template_Step|null
Return values
Deal_Template_Step|nullgetPrimaryKey()
Get primary key value
public
getPrimaryKey() : mixed
getPrimaryKeyName()
Get primary key name
public
getPrimaryKeyName() : string
Return values
stringgetPropertyValues()
Values of all properties of structure node Значения всех свойств узла структуры
public
getPropertyValues([bool $bCache = TRUE ][, array<string|int, mixed> $aPropertiesId = array() ][, bool $bSorting = FALSE ]) : array<string|int, mixed>
Parameters
- $bCache : bool = TRUE
-
cache mode status
- $aPropertiesId : array<string|int, mixed> = array()
-
array of properties' IDs
- $bSorting : bool = FALSE
-
sort results, default FALSE
Return values
array<string|int, mixed> —Property_Value
getRelatedSite()
Get Related Site
public
getRelatedSite() : Site_Model|null
Tags
Return values
Site_Model|nullgetRelations()
Get $this->_relations
public
getRelations() : array<string|int, mixed>
Return values
array<string|int, mixed>getResponsibleUsers()
Get responsible users
public
getResponsibleUsers() : array<string|int, mixed>
Return values
array<string|int, mixed>getStartDatetime()
Get start datetime
public
getStartDatetime() : string
Return values
stringgetStdObject()
Get stdObject for entity and children entities
public
getStdObject([mixed $attributePrefix = '_' ]) : stdObject
Parameters
- $attributePrefix : mixed = '_'
Tags
Return values
stdObjectgetTableColumns()
Get tableColumns
public
getTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>getTableColums()
Get table columns. Fix wrong method name
public
getTableColums() : array<string|int, mixed>
Return values
array<string|int, mixed>getTableName()
Get table name
public
getTableName() : string
Return values
stringgetTrashDescription()
Get entity description
public
getTrashDescription() : string
Tags
Return values
stringgetUsersByPermissions()
Получение списка сотрудников, обладающих заданными правами доступа к сделке 2 - редактирование, 4 - просмотр, 8 - удаление
public
getUsersByPermissions(int $iPermission) : array<string|int, mixed>
Parameters
- $iPermission : int
Return values
array<string|int, mixed>getXml()
Get XML for entity and children entities
public
getXml() : string
Tags
Return values
stringgetXmlTagName()
Get tag name
public
getXmlTagName() : string
Return values
stringgetXmlTags()
Get external XML tags for entity.
public
getXmlTags() : array<string|int, mixed>
Return values
array<string|int, mixed>isCallable()
Verify that the contents of a variable can be called as a function
public
isCallable(string $methodName) : bool
Parameters
- $methodName : string
-
method name
Return values
boolisEmptyPrimaryKey()
Check is primary key NULL
public
isEmptyPrimaryKey() : bool
Return values
boolmarkDeleted()
Mark entity as deleted
public
markDeleted() : Core_Entity
Return values
Core_EntitynameBackend()
Backend callback method
public
nameBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller[, mixed $showAmount = FALSE ]) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
- $showAmount : mixed = FALSE
Return values
stringnotifyBotsChangeTemplateStep()
Notify Bots
public
notifyBotsChangeTemplateStep() : self
Return values
selfprofitBackend()
Backend callback method
public
profitBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
stringpushHistory()
Push history
public
pushHistory(mixed $text[, mixed $color = '#333333' ]) : self
Parameters
- $text : mixed
- $color : mixed = '#333333'
Return values
selfqueryBuilder()
Get query builder for select
public
queryBuilder() : Core_QueryBuilder_Select
Return values
Core_QueryBuilder_Selectremove()
Remove related object. If main object does not save, it will save.
public
remove(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
- $model : Core_ORM
- $relation : string = NULL
Tags
Return values
selfremoveAllowedTag()
Remove tag from allowed tags list
public
removeAllowedTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
selfremoveForbiddenTag()
Remove tag from forbidden tags list
public
removeForbiddenTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
selfsave()
Save object. Uses self::update() or self::create()
public
save() : self
Tags
Return values
selfsendChangeStepNotifications()
Отправка уведомлений о изменений этапа сделки
public
sendChangeStepNotifications() : self
Return values
selfsetCheck()
Set _check flag
public
setCheck(bool $check) : self
Parameters
- $check : bool
-
mode
Return values
selfsetDatabaseDriver()
Set name of Database Driver
public
static setDatabaseDriver(string $name) : mixed
Parameters
- $name : string
-
driver's name
setMarksDeleted()
Set column name for marks deleted
public
setMarksDeleted([mixed $marksDeleted = 'deleted' ]) : self
Parameters
- $marksDeleted : mixed = 'deleted'
Return values
selfsetRelations()
Set $this->_relations
public
setRelations(array<string|int, mixed> $relations) : self
Parameters
- $relations : array<string|int, mixed>
-
Array with new relations
Return values
selfsetXmlTagName()
Set name of XML node
public
setXmlTagName(string $tagName) : self
Parameters
- $tagName : string
-
new tag name for node
Return values
selfshowCrmProjects()
Show crm project badge
public
showCrmProjects(Admin_Form_Controller_Model $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Controller : Admin_Form_Controller_Model
Return values
stringshowPerspective()
Show perspective bar
public
showPerspective() : string
Return values
stringshowType()
Show type badge
public
showType() : string
Return values
stringshowXmlAttachments()
Show files in XML
public
showXmlAttachments([bool $showXmlAttachments = TRUE ]) : self
Parameters
- $showXmlAttachments : bool = TRUE
Return values
selfshowXmlCurrency()
Show currency in XML
public
showXmlCurrency([bool $showXmlCurrency = TRUE ]) : self
Parameters
- $showXmlCurrency : bool = TRUE
Return values
selfshowXmlDealSiteusers()
Show deal siteusers in XML
public
showXmlDealSiteusers([bool $showXmlDealSiteusers = TRUE ]) : self
Parameters
- $showXmlDealSiteusers : bool = TRUE
Return values
selfshowXmlEvents()
Show events in XML
public
showXmlEvents([bool $showXmlEvents = TRUE ]) : self
Parameters
- $showXmlEvents : bool = TRUE
Return values
selfshowXmlNotes()
Show notes in XML
public
showXmlNotes([bool $showXmlNotes = TRUE ]) : self
Parameters
- $showXmlNotes : bool = TRUE
Return values
selfshowXmlProperties()
Show properties in XML
public
showXmlProperties([mixed $showXmlProperties = TRUE ][, mixed $xmlSortPropertiesValues = TRUE ]) : self
Parameters
- $showXmlProperties : mixed = TRUE
-
array of allowed properties ID or boolean
- $xmlSortPropertiesValues : mixed = TRUE
Return values
selfshowXmlShopItems()
Show shop items in XML
public
showXmlShopItems([bool $showXmlShopItems = TRUE ]) : self
Parameters
- $showXmlShopItems : bool = TRUE
Return values
selfshowXmlSiteuser()
Show siteuser in XML
public
showXmlSiteuser([bool $showXmlSiteuser = TRUE ]) : self
Parameters
- $showXmlSiteuser : bool = TRUE
Return values
selfstart_datetimeBackend()
Backend callback method
public
start_datetimeBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
stringstatusBackend()
Backend callback method
public
statusBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
stringtoArray()
Convert Object to Array
public
toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>undelete()
Turn off deleted status
public
undelete() : self
Tags
Return values
selfupdate()
Update object data into database
public
update() : self
Tags
Return values
selfupdateKanban()
Update kanban
public
updateKanban(Deal_Template_Step_Model $oDeal_Template_Step) : array<string|int, mixed>
Parameters
- $oDeal_Template_Step : Deal_Template_Step_Model
Return values
array<string|int, mixed>_getCopiedName()
Get the name of a new copied object
protected
_getCopiedName() : mixed
_isTagAvailable()
Is $tagName Available
protected
_isTagAvailable( $tagName) : bool
Parameters
Return values
bool_prepareData()
Prepare entity and children entities
protected
_prepareData() : self
Return values
self_preparePropertyValue()
Prepare Property Value
protected
_preparePropertyValue(Property_Value_Model $oProperty_Value) : mixed
Parameters
- $oProperty_Value : Property_Value_Model
getDatabase()
Get Database
protected
getDatabase() : Core_DataBase