mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-13 00:38:42 +00:00
Remove mapper abstract duplication
This commit is contained in:
parent
9d145e38a2
commit
c84db549aa
|
|
@ -69,30 +69,4 @@ class EditorDocMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'editor_doc_created_at';
|
protected static $createdAt = 'editor_doc_created_at';
|
||||||
|
|
||||||
/**
|
|
||||||
* Create object.
|
|
||||||
*
|
|
||||||
* @param mixed $obj Object
|
|
||||||
* @param int $relations Behavior for relations creation
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public static function create($obj, int $relations = RelationType::ALL)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$objId = parent::create($obj, $relations);
|
|
||||||
|
|
||||||
if ($objId === null || !is_scalar($objId)) {
|
|
||||||
return $objId;
|
|
||||||
}
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $objId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user