Class lispa\amos\admin\AmosAdmin

Inheritancelispa\amos\admin\AmosAdmin » lispa\amos\core\module\AmosModule » lispa\amos\core\module\BaseAmosModule » yii\base\Module » yii\di\ServiceLocator » yii\base\Component » yii\base\Object
Implementslispa\amos\core\interfaces\SearchModuleInterface, lispa\amos\core\module\ModuleInterface, yii\base\Configurable

Class AmosAdmin

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$aliases array List of path aliases to be defined. yii\base\Module
$allowLoginWithEmailOrUsername boolean lispa\amos\admin\AmosAdmin
$amosUniqueId string lispa\amos\core\module\BaseAmosModule
$basePath string The root directory of the module. yii\base\Module
$behaviors yii\base\Behavior[] List of behaviors attached to this component yii\base\Component
$bypassWorkflow boolean If true the plugin bypass the user profile workflow and show nothing of it. lispa\amos\admin\AmosAdmin
$cacheDuration integer Seconds of query caching duration if $cache = true - default is 1 day lispa\amos\admin\AmosAdmin
$cached boolean - enable or not admin query caching lispa\amos\admin\AmosAdmin
$components array The list of the component definitions or the loaded component instances (ID => definition or instance). yii\di\ServiceLocator
$confManager lispa\amos\admin\base\ConfigurationManager lispa\amos\admin\AmosAdmin
$controllerMap array Mapping from controller ID to controller configurations. yii\base\Module
$controllerNamespace lispa\amos\admin\AmosAdmin
$controllerPath string The directory that contains the controller classes. yii\base\Module
$defaultListViews array This set the default order for the views in lists lispa\amos\admin\AmosAdmin
$defaultRoute string The default route of this module. yii\base\Module
$defaultUserRole string lispa\amos\admin\AmosAdmin
$disableUpdateChangeStatus boolean lispa\amos\admin\AmosAdmin
$enableRegister boolean - set to true to enable user register to the application and create his own userprofile lispa\amos\admin\AmosAdmin
$enableUserContacts boolean Enable connection to users, send private messages, and see 'contacts' in section 'NETWORK' of the user profile lispa\amos\admin\AmosAdmin
$enableWorkflowChangeStatusMails boolean lispa\amos\admin\AmosAdmin
$fieldsConfigurations array This array contains all configurations for boxes and fields. lispa\amos\admin\AmosAdmin
$forceDefaultViewType boolean lispa\amos\admin\AmosAdmin
$hardDelete lispa\amos\admin\AmosAdmin
$hideWidgetGraphicsActions boolean lispa\amos\admin\AmosAdmin
$htmlMailContent string lispa\amos\admin\AmosAdmin
$htmlMailSubject string lispa\amos\admin\AmosAdmin
$i18nDirPath string lispa\amos\core\module\AmosModule
$id string An ID that uniquely identifies this module among other modules which have the same parent. yii\base\Module
$layout string|boolean The layout that should be applied for views within this module. yii\base\Module
$layoutPath string The root directory of layout files. yii\base\Module
$modelMap array lispa\amos\core\module\AmosModule
$module yii\base\Module The parent module of this module. yii\base\Module
$modules array The modules (indexed by their IDs). yii\base\Module
$name lispa\amos\admin\AmosAdmin
$organizationModuleName string lispa\amos\admin\AmosAdmin
$params array Custom module parameters (name => value). yii\base\Module
$profileRequiredFields array - mandatory fields in user profile form lispa\amos\admin\AmosAdmin
$rbacEnabled boolean lispa\amos\core\module\BaseAmosModule
$searchListFields lispa\amos\admin\AmosAdmin
$textMailContent string lispa\amos\admin\AmosAdmin
$uniqueId string The unique ID of the module. yii\base\Module
$userCanSelectUsername boolean lispa\amos\admin\AmosAdmin
$version string The version of this module. yii\base\Module
$viewPath string The root directory of view files. yii\base\Module
$whiteListProfileImageExts string List of the allowed extensions for the upload of profile image. lispa\amos\admin\AmosAdmin
$whiteListRoles lispa\amos\admin\AmosAdmin
$whiteListRules array lispa\amos\admin\AmosAdmin
$widgetGraphics array lispa\amos\admin\AmosAdmin
$widgetIcons array lispa\amos\admin\AmosAdmin

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Component
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() Constructor. yii\base\Module
__get() Getter magic method. yii\di\ServiceLocator
__isset() Checks if a property value is null. yii\di\ServiceLocator
__set() Sets the value of a component property. yii\base\Component
__unset() Sets a component property to be null. yii\base\Component
afterAction() This method is invoked right after an action within this module is executed. yii\base\Module
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
beforeAction() This method is invoked right before an action within this module is executed. yii\base\Module
beginCreateNewSessionKey() This method return the session key that must be used to add in session the url from the user have started the content creation. lispa\amos\core\module\AmosModule
beginCreateNewSessionKeyDateTime() This method return the session key that must be used to add in session the url date and time creation from the user have started the content creation. lispa\amos\core\module\AmosModule
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Component
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Component
className() Returns the fully qualified name of this class. yii\base\Object
clear() Removes the component from the locator. yii\di\ServiceLocator
createController() Creates a controller instance based on the given route. yii\base\Module
createControllerByID() Creates a controller based on the given controller ID. yii\base\Module
createModel() lispa\amos\core\module\AmosModule
createNewAccount() The method create a new account. It creates a new User and new UserProfile only with name, surname and email. The email must be unique in the database! This method returns the user id if all goes well. It returns boolean false in case of errors. lispa\amos\admin\AmosAdmin
defineModelClasses() Merges the default and user defined model classes Also let's the developer to set new ones with the parameter being those the ones with most preference. lispa\amos\core\module\AmosModule
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
fetchGoogleContacts() lispa\amos\admin\AmosAdmin
get() Returns the component instance with the specified ID. yii\di\ServiceLocator
getAmosUniqueId() lispa\amos\core\module\BaseAmosModule
getBasePath() Returns the root directory of the module. yii\base\Module
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
getComponents() Returns the list of the component definitions or the loaded component instances. yii\di\ServiceLocator
getControllerPath() Returns the directory that contains the controller classes according to $controllerNamespace. yii\base\Module
getI18nDirPath() lispa\amos\core\module\AmosModule
getInstance() Returns the currently requested instance of this module class. yii\base\Module
getLayoutPath() Returns the directory that contains layout view files for this module. yii\base\Module
getModelSearchClassName() lispa\amos\admin\AmosAdmin
getModule() Retrieves the child module of the specified ID. yii\base\Module
getModuleIconName() lispa\amos\admin\AmosAdmin
getModuleName() Module name lispa\amos\admin\AmosAdmin
getModules() Returns the sub-modules in this module. yii\base\Module
getOrganizationModuleName() lispa\amos\admin\AmosAdmin
getRbacEnabled() lispa\amos\core\module\BaseAmosModule
getUniqueId() Returns an ID that uniquely identifies this module among all modules within the current application. yii\base\Module
getVersion() Returns current module version. yii\base\Module
getViewPath() Returns the directory that contains the view files for this module. yii\base\Module
getWhiteListRoles() Return list of white Roles lispa\amos\admin\AmosAdmin
getWhiteListRules() Get roles white-list lispa\amos\admin\AmosAdmin
getWidgetGraphics() Array of widget-namespaces that belong to the module lispa\amos\admin\AmosAdmin
getWidgetIcons() Array of widget-namespaces that belong to the module lispa\amos\admin\AmosAdmin
has() Returns a value indicating whether the locator has the specified component definition or has instantiated the component. yii\di\ServiceLocator
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\Component
hasModule() Checks whether the child module of the specified ID exists. yii\base\Module
hasProperty() Returns a value indicating whether a property is defined for this component. yii\base\Component
init() Module Initialization lispa\amos\admin\AmosAdmin
instance() Return an instance of module lispa\amos\core\module\AmosModule
model() Get defined className of model lispa\amos\core\module\AmosModule
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
removeGoogleContacts() lispa\amos\admin\AmosAdmin
runAction() Runs a controller action specified by a route. yii\base\Module
set() Registers a component definition with this locator. yii\di\ServiceLocator
setAliases() Defines path aliases. yii\base\Module
setBasePath() Sets the root directory of the module. yii\base\Module
setComponents() Registers a set of component definitions in this locator. yii\di\ServiceLocator
setInstance() Sets the currently requested instance of this module class. yii\base\Module
setLayoutPath() Sets the directory that contains the layout files. yii\base\Module
setModule() Adds a sub-module to this module. yii\base\Module
setModuleName() lispa\amos\admin\AmosAdmin
setModules() Registers sub-modules in the current module. yii\base\Module
setOrganizationModuleName() lispa\amos\admin\AmosAdmin
setRbacEnabled() lispa\amos\core\module\BaseAmosModule
setVersion() Sets current module version. yii\base\Module
setViewPath() Sets the directory that contains the view files. yii\base\Module
synchronizeGoogleContacts() lispa\amos\admin\AmosAdmin
t() lispa\amos\core\module\BaseAmosModule
tHtml() Metodo da usare per tutte le traduzioni che non fanno parte di attributi dei tag html (es. Non si può usare nell'attributo "title" del tag "a") lispa\amos\core\module\BaseAmosModule
tOld() Metodo vecchio stile com'era nei plugin prima di introdurre le traduzioni a db. lispa\amos\core\module\BaseAmosModule
trigger() Triggers an event. yii\base\Component

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
defaultVersion() Returns default module version. yii\base\Module
getDefaultModels() Get default models lispa\amos\admin\AmosAdmin

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_AFTER_ACTION yii\base\ActionEvent An event raised after executing a controller action. yii\base\Module
EVENT_BEFORE_ACTION yii\base\ActionEvent An event raised before executing a controller action. yii\base\Module

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
GOOGLE_CONTACTS 'contacts' lispa\amos\admin\AmosAdmin
GOOGLE_CONTACTS_NOT_PLATFORM 'contacts_not_platform' lispa\amos\admin\AmosAdmin
GOOGLE_CONTACTS_PLATFORM 'contacts_platform' lispa\amos\admin\AmosAdmin
site_key_param 'google_recaptcha_site_key' lispa\amos\admin\AmosAdmin

Property Details

$allowLoginWithEmailOrUsername public property
$bypassWorkflow public property

If true the plugin bypass the user profile workflow and show nothing of it.

public boolean $bypassWorkflow false
$cacheDuration public property

Seconds of query caching duration if $cache = true - default is 1 day

public integer $cacheDuration 84600
$cached public property
  • enable or not admin query caching
public boolean $cached false
$confManager public property
$controllerNamespace public property
public $controllerNamespace 'lispa\amos\admin\controllers'
$defaultListViews public property

This set the default order for the views in lists

public array $defaultListViews = ['icon''grid''list']
$defaultUserRole public property
public string $defaultUserRole 'BASIC_USER'
$disableUpdateChangeStatus public property
$enableRegister public property
  • set to true to enable user register to the application and create his own userprofile
public boolean $enableRegister false
$enableUserContacts public property

Enable connection to users, send private messages, and see 'contacts' in section 'NETWORK' of the user profile

$enableWorkflowChangeStatusMails public property
$fieldsConfigurations public property

This array contains all configurations for boxes and fields.

public array $fieldsConfigurations = ['boxes' => ['box_informazioni_base' => ['form' => true'view' => true]], 'fields' => ['nome' => ['form' => true'view' => true'referToBox' => 'box_informazioni_base'], 'cognome' => ['form' => true'view' => true'referToBox' => 'box_informazioni_base'], 'userProfileImage' => ['form' => true'view' => true'referToBox' => 'box_foto']]]
$forceDefaultViewType public property
$hardDelete public property
public $hardDelete false
$hideWidgetGraphicsActions public property
$htmlMailContent public property
public string $htmlMailContent '@vendor/lispa/amos-admin/src/mail/user/credenziali-html'
$htmlMailSubject public property
public string $htmlMailSubject '@vendor/lispa/amos-admin/src/mail/user/credenziali-subject'
$name public property
public $name 'Utenti'
$organizationModuleName public property
public string getOrganizationModuleName ( )
public void setOrganizationModuleName ( $organizationModuleName )
$profileRequiredFields public property
  • mandatory fields in user profile form
public array $profileRequiredFields = ['nome''cognome''status''presentazione_breve']
$searchListFields public property
public $searchListFields = []
$textMailContent public property
public string $textMailContent '@vendor/lispa/amos-admin/src/mail/user/credenziali-text'
$userCanSelectUsername public property
$whiteListProfileImageExts public property

List of the allowed extensions for the upload of profile image.

public string $whiteListProfileImageExts 'jpeg, jpg, png, gif'
$whiteListRoles public read-only property
public [] getWhiteListRoles ( )
$whiteListRules public read-only property
$widgetGraphics public read-only property
$widgetIcons public read-only property

Method Details

createNewAccount() public method

The method create a new account. It creates a new User and new UserProfile only with name, surname and email. The email must be unique in the database! This method returns the user id if all goes well. It returns boolean false in case of errors.

public array createNewAccount ( $name, $surname, $email, $privacy, $sendCredentials false, $community null )
$name string
$surname string
$email string
$privacy
$sendCredentials boolean|false

If credential mail must be sent to the newly created user

$community lispa\amos\community\models\Community
fetchGoogleContacts() public static method

public static null|string fetchGoogleContacts ( $id null )
$id null|integer
getDefaultModels() protected method

Get default models

protected array getDefaultModels ( )
getModelSearchClassName() public static method

public static void getModelSearchClassName ( )
getModuleIconName() public static method

public static void getModuleIconName ( )
getModuleName() public static method

Module name

public static string getModuleName ( )
getOrganizationModuleName() public method

public string getOrganizationModuleName ( )
getWhiteListRoles() public method

Return list of white Roles

public [] getWhiteListRoles ( )
getWhiteListRules() public method

Get roles white-list

public array getWhiteListRules ( )
getWidgetGraphics() public method

Array of widget-namespaces that belong to the module

public array getWidgetGraphics ( )
getWidgetIcons() public method

Array of widget-namespaces that belong to the module

public array getWidgetIcons ( )
init() public method

Module Initialization

public void init ( )
throws lispa\amos\admin\exceptions\AdminException
removeGoogleContacts() public static method

public static void removeGoogleContacts ( )
setModuleName() public static method

public static void setModuleName ( $moduleName )
$moduleName string
setOrganizationModuleName() public method

public void setOrganizationModuleName ( $organizationModuleName )
$organizationModuleName string
synchronizeGoogleContacts() public static method

public static string synchronizeGoogleContacts ( $serviceGoogle )
$serviceGoogle \Google_Service_PeopleService
return string

$message