Created
March 4, 2016 20:29
-
-
Save iolloyd/f366f6fa831f00ef9e7b to your computer and use it in GitHub Desktop.
defining a relationship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace API\Service\Command; | |
use API\Service\CommandService; | |
class ContentCommandService extends CommandService | |
{ | |
protected $hasMany = 'Asset'; | |
protected $uses = 'ContentMapping'; | |
public function create(array $params, $userId = false) { | |
$id = parent::create($params, $userId); | |
return $id; | |
} | |
public function modify($id, array $params, $userId = false) { | |
$id = parent::modify($id, $params, $userId); | |
return $id; | |
} | |
public function remove($id, $userId = false) { | |
$success = parent::remove($id, $userId); | |
return $success; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment