ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjectPropertyIsOnline Class Reference
+ Inheritance diagram for ilObjectPropertyIsOnline:
+ Collaboration diagram for ilObjectPropertyIsOnline:

Public Member Functions

 __construct (private bool $is_online=self::DEFAULT_IS_ONLINE)
 
 getIsOnline ()
 
 withOnline ()
 
 withOffline ()
 
 toForm (\ilLanguage $language, FieldFactory $field_factory, Refinery $refinery)
 
- Public Member Functions inherited from ilObjectProperty
 toForm (ilLanguage $language, FieldFactory $field_factory, Refinery $refinery)
 

Private Attributes

const DEFAULT_IS_ONLINE = false
 
const INPUT_LABEL = 'online'
 
const INPUT_BYLINE = 'online_input_byline'
 

Detailed Description

Author
Stephan Kergomard

Definition at line 28 of file ilObjectPropertyIsOnline.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectPropertyIsOnline::__construct ( private bool  $is_online = self::DEFAULT_IS_ONLINE)

Definition at line 34 of file ilObjectPropertyIsOnline.php.

36  {
37  }

Member Function Documentation

◆ getIsOnline()

ilObjectPropertyIsOnline::getIsOnline ( )

Definition at line 39 of file ilObjectPropertyIsOnline.php.

Referenced by toForm().

39  : bool
40  {
41  return $this->is_online;
42  }
+ Here is the caller graph for this function:

◆ toForm()

ilObjectPropertyIsOnline::toForm ( \ilLanguage  $language,
FieldFactory  $field_factory,
Refinery  $refinery 
)

Definition at line 58 of file ilObjectPropertyIsOnline.php.

References getIsOnline(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().

62  : Checkbox {
63  $trafo = $refinery->custom()->transformation(
64  function ($v): ilObjectProperty {
65  return new ilObjectPropertyIsOnline($v);
66  }
67  );
68  return $field_factory->checkbox($language->txt(self::INPUT_LABEL))
69  ->withByline($language->txt(self::INPUT_BYLINE))
71  ->withValue($this->getIsOnline());
72  }
This describes checkbox inputs.
Definition: Checkbox.php:28
+ Here is the call graph for this function:

◆ withOffline()

ilObjectPropertyIsOnline::withOffline ( )

Definition at line 51 of file ilObjectPropertyIsOnline.php.

51  : self
52  {
53  $clone = clone $this;
54  $clone->is_online = false;
55  return $clone;
56  }

◆ withOnline()

ilObjectPropertyIsOnline::withOnline ( )

Definition at line 44 of file ilObjectPropertyIsOnline.php.

44  : self
45  {
46  $clone = clone $this;
47  $clone->is_online = true;
48  return $clone;
49  }

Field Documentation

◆ DEFAULT_IS_ONLINE

const ilObjectPropertyIsOnline::DEFAULT_IS_ONLINE = false
private

Definition at line 30 of file ilObjectPropertyIsOnline.php.

◆ INPUT_BYLINE

const ilObjectPropertyIsOnline::INPUT_BYLINE = 'online_input_byline'
private

Definition at line 32 of file ilObjectPropertyIsOnline.php.

◆ INPUT_LABEL

const ilObjectPropertyIsOnline::INPUT_LABEL = 'online'
private

Definition at line 31 of file ilObjectPropertyIsOnline.php.


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