ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAbstractBuddySystemRelationStateButtonRenderer Class Reference

Class ilAbstractBuddySystemRelationStateButtonRenderer. More...

+ Inheritance diagram for ilAbstractBuddySystemRelationStateButtonRenderer:
+ Collaboration diagram for ilAbstractBuddySystemRelationStateButtonRenderer:

Public Member Functions

 __construct ($user_id, ilBuddySystemRelation $relation)
 
 getHtml ()
 
 getHtml ()
 

Protected Member Functions

 getLanguageVariableSuffix ()
 
 render ()
 
 getTemplateVariablePrefix ()
 

Protected Attributes

 $relation
 
 $user_id
 
 $tpl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAbstractBuddySystemRelationStateButtonRenderer::__construct (   $user_id,
ilBuddySystemRelation  $relation 
)
Parameters
int$user_id
ilBuddySystemRelation$relation

Definition at line 32 of file class.ilAbstractBuddySystemRelationStateButtonRenderer.php.

33 {
34 $this->user_id = $user_id;
35 $this->relation = $relation;
36
37 $this->tpl = new ilTemplate(
38 'tpl.buddy_system_state_' . ilStr::convertUpperCamelCaseToUnderscoreCase($this->relation->getState()->getName()) . '.html',
39 true,
40 true,
41 'Services/Contact/BuddySystem'
42 );
43 }
static convertUpperCamelCaseToUnderscoreCase($value)
Convert a value given in camel case conversion to underscore case conversion (e.g.
special template class to simplify handling of ITX/PEAR

References $relation, $user_id, and ilStr\convertUpperCamelCaseToUnderscoreCase().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHtml()

ilAbstractBuddySystemRelationStateButtonRenderer::getHtml ( )
Returns
string

Implements ilBuddySystemRelationStateButtonRenderer.

Definition at line 134 of file class.ilAbstractBuddySystemRelationStateButtonRenderer.php.

References render().

+ Here is the call graph for this function:

◆ getLanguageVariableSuffix()

ilAbstractBuddySystemRelationStateButtonRenderer::getLanguageVariableSuffix ( )
protected
Returns
string

Definition at line 48 of file class.ilAbstractBuddySystemRelationStateButtonRenderer.php.

49 {
50 if($this->relation->isOwnedByRequest())
51 {
52 $suffix = '_a';
53 }
54 else
55 {
56 $suffix = '_p';
57 }
58 return $suffix;
59 }

◆ getTemplateVariablePrefix()

ilAbstractBuddySystemRelationStateButtonRenderer::getTemplateVariablePrefix ( )
protected
Returns
string

Reimplemented in ilBuddySystemSubjectDependentRelationStateButtonRenderer.

Definition at line 77 of file class.ilAbstractBuddySystemRelationStateButtonRenderer.php.

78 {
79 return '';
80 }

◆ render()

ilAbstractBuddySystemRelationStateButtonRenderer::render ( )
protected

Reimplemented in ilBuddySystemSubjectDependentRelationStateButtonRenderer.

Definition at line 64 of file class.ilAbstractBuddySystemRelationStateButtonRenderer.php.

65 {
66 $this->renderStateButton();
67 $states = $this->relation->getCurrentPossibleTargetStates();
68 foreach($states as $target_state)
69 {
70 $this->renderTargetState($target_state);
71 }
72 }

Referenced by getHtml().

+ Here is the caller graph for this function:

Field Documentation

◆ $relation

ilAbstractBuddySystemRelationStateButtonRenderer::$relation
protected

◆ $tpl

ilAbstractBuddySystemRelationStateButtonRenderer::$tpl
protected

◆ $user_id

ilAbstractBuddySystemRelationStateButtonRenderer::$user_id
protected

The documentation for this class was generated from the following file: