mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix formatting and docblock
This commit is contained in:
parent
08bf6984cd
commit
5b56b7367d
|
|
@ -115,8 +115,15 @@ trait PermissionHandlingTrait
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function hasPermission(int $permission, int $unit = null, string $app = null, string $module = null, int $type = null, int $element = null, int $component = null) : bool
|
||||
{
|
||||
public function hasPermission(
|
||||
int $permission,
|
||||
int $unit = null,
|
||||
string $app = null,
|
||||
string $module = null,
|
||||
int $type = null,
|
||||
int $element = null,
|
||||
int $component = null
|
||||
) : bool {
|
||||
$app = $app !== null ? \strtolower($app) : $app;
|
||||
|
||||
foreach ($this->permissions as $p) {
|
||||
|
|
|
|||
|
|
@ -239,21 +239,21 @@ abstract class ModuleAbstract
|
|||
/**
|
||||
* Create a model
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param mixed $obj Response object
|
||||
* @param string $mapper Object mapper
|
||||
* @param string $trigger Trigger for the event manager
|
||||
* @param int $account Account id
|
||||
* @param mixed $obj Response object
|
||||
* @param string $mapper Object mapper
|
||||
* @param string $trigger Trigger for the event manager
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected function createModel(RequestAbstract $request, $obj, string $mapper, string $trigger) : void
|
||||
protected function createModel(int $account, $obj, string $mapper, string $trigger) : void
|
||||
{
|
||||
$this->app->eventManager->trigger('PRE:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', $obj);
|
||||
$mapper::create($obj);
|
||||
$this->app->eventManager->trigger('POST:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', [
|
||||
$request->getHEader()->getAccount(),
|
||||
$account,
|
||||
null, $obj,
|
||||
0, 0,
|
||||
static::MODULE_NAME,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user