for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright (c) Flipbox Digital Limited
* @license https://github.com/flipboxfactory/craft-ember/blob/master/LICENSE
* @link https://github.com/flipboxfactory/craft-ember
*/
namespace flipbox\ember\actions\record\traits;
use flipbox\ember\actions\traits\Populate;
use yii\db\ActiveRecord;
* @method ActiveRecord populate(ActiveRecord $record)
*
* @author Flipbox Factory <[email protected]>
* @since 1.0.0
trait Save
{
use Populate, Manage;
* @inheritdoc
* @param ActiveRecord $record
public function runInternal(ActiveRecord $record)
if (($access = $this->checkAccess($record)) !== true) {
return $access;
}
if (!$this->performAction(
$this->populate($record)
)) {
return $this->handleFailResponse($record);
return $this->handleSuccessResponse($record);