Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 697

This tag is used for questions which involve PHP code in any way. So as soon there is a PHP Exception returned or error report generated, this question qualifies to be tagged with PHP.

2
votes
According to implementation of this API (Mage_Catalog_Model_Product_Attribute_Media_Api::items()), result is always an array. So if ($result) should return true only in case when product has images. …
answered Nov 25 '15 by Alex Paliarush
4
votes
Regarding the urlModel field, it is possible to get warning if its visibility set to private and mess detector is configured in PHPStorm with dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd … thus considered as used. It is possible to quickly check every field in a class using 'Find usages' feature in PHP Storm, if there are no 'read' usages then most likely it can be safely removed. General …
answered Dec 13 '15 by Alex Paliarush
9
votes
Response is marked as cacheable in \Magento\PageCache\Model\Layout\LayoutPlugin::afterGenerateXml only in case if there are no blocks in the layout of current page marked with cacheable="false" attrib …
answered Dec 8 '15 by Alex Paliarush
8
votes
something even more custom, consider \Magento\Framework\Controller\Result\Raw. Working sample: <?php namespace VendorName\ModuleName\Controller; /** * Demo of authorization error for custom REST API …
answered Nov 30 '15 by Alex Paliarush
4
votes
<?php namespace VendorName\ModuleName\Model\Plugin; use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection; /** * This plugin fixes issue with filtration by store/website …
answered Nov 23 '15 by Alex Paliarush
1
vote
CustomerInterface is non-injectable and should not be injected in the construct directly, inject factory instead. It is possible to use populateWithArray like is done in \Magento\Customer\Model\Custom …
answered Jan 29 '16 by Alex Paliarush
13
votes
Actual annotation of \Magento\Framework\Api\Search\FilterGroup says (class phpDoc): Groups two or more filters together using a logical OR It means that you need to create two groups with one fi …
answered Nov 20 '15 by Alex Paliarush