ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMMAbstractBaseTypeHandlerAction Class Reference

Class ilMMAbstractBaseTypeHandlerAction. More...

+ Inheritance diagram for ilMMAbstractBaseTypeHandlerAction:
+ Collaboration diagram for ilMMAbstractBaseTypeHandlerAction:

Public Member Functions

 __construct ()
 
 matchesForType ()
 
 enrichItem (isItem $item)
 
Parameters
isItem$item
Returns
isItem
More...
 
 saveFormFields (IdentificationInterface $identification, array $data)
 
Parameters
IdentificationInterface$identification
array$data
Returns
bool
More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Collector\Handler\TypeHandler
 getAdditionalFieldsForSubForm (IdentificationInterface $identification)
 

Data Fields

const F_ACTION = 'action'
 
const F_EXTERNAL = 'external'
 

Protected Member Functions

 getFieldTranslation ()
 
 getFieldInfoTranslation ()
 

Protected Attributes

array $links = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMMAbstractBaseTypeHandlerAction::__construct ( )

Definition at line 38 of file class.ilMMAbstractBaseTypeHandlerAction.php.

References enrichItem(), ActiveRecord\getArray(), and matchesForType().

39  {
40  $this->links = ilMMTypeActionStorage::getArray('identification', [self::F_ACTION, self::F_EXTERNAL]);
41  }
static getArray(?string $key=null, $values=null)
+ Here is the call graph for this function:

Member Function Documentation

◆ enrichItem()

ilMMAbstractBaseTypeHandlerAction::enrichItem ( isItem  $item)
abstract

Parameters
isItem$item
Returns
isItem

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Handler\TypeHandler.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getFieldInfoTranslation()

ilMMAbstractBaseTypeHandlerAction::getFieldInfoTranslation ( )
abstractprotected

Referenced by saveFormFields().

+ Here is the caller graph for this function:

◆ getFieldTranslation()

ilMMAbstractBaseTypeHandlerAction::getFieldTranslation ( )
abstractprotected
Returns
string

Referenced by saveFormFields().

+ Here is the caller graph for this function:

◆ matchesForType()

ilMMAbstractBaseTypeHandlerAction::matchesForType ( )
abstract
Returns
string Classname of matching Type this TypeHandler can handle

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Handler\TypeHandler.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ saveFormFields()

ilMMAbstractBaseTypeHandlerAction::saveFormFields ( IdentificationInterface  $identification,
array  $data 
)

Parameters
IdentificationInterface$identification
array$data
Returns
bool

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Handler\TypeHandler.

Definition at line 53 of file class.ilMMAbstractBaseTypeHandlerAction.php.

References $DIC, $url, ilMMTypeActionStorage\find(), ILIAS\GlobalScreen\Scope\MainMenu\Collector\Handler\TypeHandler\getAdditionalFieldsForSubForm(), getFieldInfoTranslation(), getFieldTranslation(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().

53  : bool
54  {
55  $storage = ilMMTypeActionStorage::find($identification->serialize());
56  if (!$storage instanceof ilMMTypeActionStorage) {
57  return false;
58  }
59  $storage->setAction((string) ($data[self::F_ACTION] ?? '#'));
60  $storage->setExternal((bool) ($data[self::F_EXTERNAL] ?? false));
61  $storage->update();
62 
63  return true;
64  }
static find($primary_key, array $add_constructor_args=array())
Class ilMMTypeActionStorage.
+ Here is the call graph for this function:

Field Documentation

◆ $links

array ilMMAbstractBaseTypeHandlerAction::$links = []
protected

Definition at line 33 of file class.ilMMAbstractBaseTypeHandlerAction.php.

◆ F_ACTION

const ilMMAbstractBaseTypeHandlerAction::F_ACTION = 'action'

Definition at line 35 of file class.ilMMAbstractBaseTypeHandlerAction.php.

◆ F_EXTERNAL

const ilMMAbstractBaseTypeHandlerAction::F_EXTERNAL = 'external'

Definition at line 36 of file class.ilMMAbstractBaseTypeHandlerAction.php.


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