Class ilBuddySystemRelationStateFactory.
More...
◆ __construct()
ilBuddySystemRelationStateFactory::__construct |
( |
| ) |
|
|
protected |
◆ getInitialState()
ilBuddySystemRelationStateFactory::getInitialState |
( |
| ) |
|
◆ getInstance()
static ilBuddySystemRelationStateFactory::getInstance |
( |
| ) |
|
|
static |
◆ getRendererByOwnerAndRelation()
ilBuddySystemRelationStateFactory::getRendererByOwnerAndRelation |
( |
|
$owner_id, |
|
|
ilBuddySystemRelation |
$relation |
|
) |
| |
- Parameters
-
- Returns
- ilBuddySystemRelationStateButtonRenderer
- Exceptions
-
Definition at line 137 of file class.ilBuddySystemRelationStateFactory.php.
138 {
139 $state_class = get_class($relation->
getState());
140 $renderer_class = $state_class . 'ButtonRenderer';
141 $renderer_path = "Services/Contact/BuddySystem/classes/states/renderer/class.{$renderer_class}.php";
142
143 if(!file_exists($renderer_path))
144 {
146 }
147
148 require_once $renderer_path;
149 if(!class_exists($renderer_class))
150 {
151 throw new ilBuddySystemException(sprintf(
"Could not find a renderer class for state: %s in file: %s", $state_class, $renderer_path));
152 }
153
154 return new $renderer_class($owner_id, $relation);
155 }
References ilBuddySystemRelation\getState().
◆ $instance
ilBuddySystemRelationStateFactory::$instance |
|
staticprotected |
◆ $state_option_array
ilBuddySystemRelationStateFactory::$state_option_array |
|
staticprotected |
◆ $valid_states
ilBuddySystemRelationStateFactory::$valid_states |
|
staticprotected |
The documentation for this class was generated from the following file: