1
0
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:
Toby Zerner
2015-10-08 16:49:11 +10:30
parent dd67291ce0
commit 72a3582287
7 changed files with 66 additions and 6 deletions

View File

@@ -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;
}
}