saveEmotion example

/** * Model event listener function which fired when the user configure an emotion over the backend * module and clicks the save button. * * @return void */
    public function saveAction()
    {
        try {
            $data = $this->Request()->getParams();

            $emotion = $this->saveEmotion($data);

            if ($emotion === null) {
                $this->View()->assign([
                    'data' => $this->Request()->getParams(),
                    'success' => false,
                ]);

                return;
            }

            $alreadyExists = $this->hasEmotionForSameDeviceType((int) $data['categoryId']);

            
Home | Imprint | This part of the site doesn't use cookies.