[CORE][Entity] Rename createOrUpdate to 'checkExistingAndCreateOrUpdate', remove update feature from 'create' and add 'createOrUpdate' and fix users
This commit is contained in:
@@ -84,16 +84,14 @@ class NoteToLink extends Entity
|
||||
* Create an instance of NoteToLink or fill in the
|
||||
* properties of $obj with the associative array $args. Doesn't
|
||||
* persist the result
|
||||
*
|
||||
* @param null|mixed $obj
|
||||
*/
|
||||
public static function create(array $args, $obj = null)
|
||||
public static function create(array $args, bool $_delegated_call = false): static
|
||||
{
|
||||
$link = DB::find('link', ['id' => $args['link_id']]);
|
||||
$note = DB::find('note', ['id' => $args['note_id']]);
|
||||
Event::handle('NewLinkFromNote', [$link, $note]);
|
||||
$obj = new self();
|
||||
return parent::create($args, $obj);
|
||||
return parent::createOrUpdate($args, $obj);
|
||||
}
|
||||
|
||||
public static function removeWhereNoteId(int $note_id): mixed
|
||||
|
Reference in New Issue
Block a user