show image on view product photos page, setEntityClass defaulting to all plugin entities

This commit is contained in:
bs
2025-09-01 00:46:18 -07:00
parent 155095c25c
commit 8cf8d7cfa0
9 changed files with 40 additions and 1 deletions
+5
View File
@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace CakeProducts\Model\Table;
use Cake\Core\Configure;
use Cake\Database\Type\EnumType;
use Cake\Datasource\EntityInterface;
use Cake\Datasource\ResultSetInterface;
@@ -51,6 +52,10 @@ class ProductsTable extends Table
$this->setDisplayField('name');
$this->setPrimaryKey('id');
$this->setEntityClass(
Configure::read('CakeProducts.Products.entity', 'CakeProducts\Model\Entity\Product')
);
$this->belongsTo('ProductCategories', [
'foreignKey' => 'product_category_id',
'bindingKey' => 'internal_id',