mirror of
https://github.com/flarum/core.git
synced 2025-10-19 02:36:08 +02:00
Update various event APIs
This commit is contained in:
@@ -37,4 +37,14 @@ class GetModelRelationship
|
||||
$this->model = $model;
|
||||
$this->relationship = $relationship;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $model
|
||||
* @param string $relationship
|
||||
* @return bool
|
||||
*/
|
||||
public function isRelationship($model, $relationship)
|
||||
{
|
||||
return $this->model instanceof $model && $this->relationship === $relationship;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user