Open ducquy23 opened 1 year ago
I have table in database: (Table name: ecommage_blogs (id (pk), title, author_id (a.k.a customer_id), url_key, content, created_at, updated_at, status - 1: publish, 2: draft, 3: non-publish), Now I want to join to the customer_entity table to get the email displayed on the grid listing,I have a reference in some documents, they say just add the _initSelect() method in the Collection.php file and join the table to join and go to the grid listing to see the results. <?php namespace Ecommage\Blogext3\Model\ResourceModel\Blog;
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { protected $_idFieldName = 'id'; protected $_eventPrefix = 'ecommage_blogs_collection'; protected $_eventObject = 'blogs_collection'; /**
Sorry, but your question is not related to the repository source code where you ask the question.
Hi, can you give me an example of the second table and the grid columns?