Class lispa\amos\core\utilities\ModalUtility

Inheritancelispa\amos\core\utilities\ModalUtility » yii\base\Object
Implementsyii\base\Configurable

Class ModalUtility

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Object
__construct() Constructor. yii\base\Object
__get() Returns the value of an object property. yii\base\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
addConfirmRejectWithModal() lispa\amos\core\utilities\ModalUtility
amosModal() lispa\amos\core\utilities\ModalUtility
amosModalDefaultId() lispa\amos\core\utilities\ModalUtility
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
createAlertModal() lispa\amos\core\utilities\ModalUtility
createAlertModalDefaultId() lispa\amos\core\utilities\ModalUtility
createConfirmModal() lispa\amos\core\utilities\ModalUtility
createConfirmModalDefaultId() lispa\amos\core\utilities\ModalUtility
getBackToEditPopup() When user clicks on edit button: - if the user can validate the model or the model is in draft status goes to update page, the status will not be changed - otherwise a popup tells the user the status will be set back to draft, on confirmation the status changes and user goes to update page lispa\amos\core\utilities\ModalUtility
hasMethod() Returns a value indicating whether a method is defined. yii\base\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
init() Initializes the object. yii\base\Object

Method Details

addConfirmRejectWithModal() public static method

public static string addConfirmRejectWithModal ( $configurations )
$configurations
amosModal() public static method

public static void amosModal ( $modalConfiguration )
$modalConfiguration array
amosModalDefaultId() public static method

public static string amosModalDefaultId ( )
createAlertModal() public static method

public static void createAlertModal ( $modalConfiguration )
$modalConfiguration array

Eg. [ 'id' => 'my-modal-id', 'modalDescriptionText' => 'This is the text I want to display inside the modal alert', 'btnLabel' => 'OK', //if missing 'close' label is used 'btnLink' => '/module/controller/my-action', 'btnOptions' => [ 'class' => 'my-btn-class' ], //options for html tag a - if missing a default class is used and the button just closes the modal 'modalOptions' => ['class' => 'my-div-class'], //option for html tag div containing the button - if missing a default class is used ]

createAlertModalDefaultId() public static method

public static void createAlertModalDefaultId ( )
createConfirmModal() public static method

public static void createConfirmModal ( $modalConfiguration )
$modalConfiguration array
createConfirmModalDefaultId() public static method

public static void createConfirmModalDefaultId ( )
getBackToEditPopup() public static method

When user clicks on edit button: - if the user can validate the model or the model is in draft status goes to update page, the status will not be changed - otherwise a popup tells the user the status will be set back to draft, on confirmation the status changes and user goes to update page

public static array getBackToEditPopup ( $model, $modelValidatePermission, $actionModify, $optionsModify )
$model lispa\amos\core\interfaces\WorkflowModelInterface|lispa\amos\core\record\Record
$modelValidatePermission string
$actionModify
$optionsModify
return array

$optionsModify