mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +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
|
* @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;
|
$app = $app !== null ? \strtolower($app) : $app;
|
||||||
|
|
||||||
foreach ($this->permissions as $p) {
|
foreach ($this->permissions as $p) {
|
||||||
|
|
|
||||||
|
|
@ -239,21 +239,21 @@ abstract class ModuleAbstract
|
||||||
/**
|
/**
|
||||||
* Create a model
|
* Create a model
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param int $account Account id
|
||||||
* @param mixed $obj Response object
|
* @param mixed $obj Response object
|
||||||
* @param string $mapper Object mapper
|
* @param string $mapper Object mapper
|
||||||
* @param string $trigger Trigger for the event manager
|
* @param string $trigger Trigger for the event manager
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @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);
|
$this->app->eventManager->trigger('PRE:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', $obj);
|
||||||
$mapper::create($obj);
|
$mapper::create($obj);
|
||||||
$this->app->eventManager->trigger('POST:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', [
|
$this->app->eventManager->trigger('POST:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', [
|
||||||
$request->getHEader()->getAccount(),
|
$account,
|
||||||
null, $obj,
|
null, $obj,
|
||||||
0, 0,
|
0, 0,
|
||||||
static::MODULE_NAME,
|
static::MODULE_NAME,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user