diff --git a/src/View/Helper/CrudViewHelper.php b/src/View/Helper/CrudViewHelper.php index 248d80a7..a2ce79e7 100644 --- a/src/View/Helper/CrudViewHelper.php +++ b/src/View/Helper/CrudViewHelper.php @@ -1,7 +1,7 @@ _context = $record; } @@ -55,7 +55,7 @@ public function setContext(Entity $record) /** * Get context * - * @return \Cake\ORM\Entity + * @return \Cake\Datasource\EntityInterface */ public function getContext() { @@ -66,11 +66,11 @@ public function getContext() * Process a single field into an output * * @param string $field The field to process. - * @param Entity $data The entity data. + * @param \Cake\Datasource\EntityInterface $data The entity data. * @param array $options Processing options. * @return string|null|array|bool|int */ - public function process($field, Entity $data, array $options = []) + public function process($field, EntityInterface $data, array $options = []) { $this->setContext($data); @@ -102,11 +102,11 @@ public function process($field, Entity $data, array $options = []) /** * Get the current field value * - * @param Entity $data The entity data. + * @param \Cake\Datasource\EntityInterface $data The entity data. * @param string $field The field to extract, if null, the field from the entity context is used. * @return mixed */ - public function fieldValue(Entity $data, $field) + public function fieldValue(EntityInterface $data, $field) { if (empty($data)) { $data = $this->getContext();