Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Models contain most of the business logic in Magento modules
1
vote
Get Model Properties ( DB column )
For who are struggling with this in Magento 2:
In your custom resource model class, add this function:
public function getFields()
{
$fields = $this->getConnection()->describeTable($this->getMainTable …
1
vote
Accepted
Magento 2 model fields validation?
After a couple of hours googling, I found this article https://www.ashsmith.io/magento2/module-from-scratch-module-part-2-models/
Model is used to interact with data
Resource model is used to interact … In Resource model, there is a method called _beforeSave
/**
* Process post data before saving
*
* @param \Magento\Framework\Model\AbstractModel $object
* @return $this
* @ …
1
vote
3
answers
2k
views
Magento 2 model fields validation?
Where is the correct place to validate field in model? …