Magento\Framework\Stdlib\ArrayManager
- Provides methods for nested array manipulations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img data-bind="attr: { 'src': require.toUrl('images/loader-2.gif')" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<container name="some.container" htmlTag="div" htmlClass="container"> | |
<!-- Force container to render --> | |
<block class="Magento\Framework\View\Element\Text"> | |
<arguments> | |
<argument name="text" xsi:type="string"><![CDATA[ ]]></argument> | |
</arguments> | |
</block> | |
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<attribute name="class" value="custom-class"/> | |
</body> | |
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\ModuleName\ViewModel; | |
use Magento\Framework\View\Element\Block\ArgumentInterface; | |
/** | |
* ClassViewModel | |
*/ | |
class ClassViewModel implements ArgumentInterface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<head> | |
<remove src="name.css"/> | |
</head> | |
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uploadField = document.getElementById("file"); | |
uploadField.onchange = function() { | |
if(this.files[0].size > 2097152){ // 2MB | |
alert("File is too big!"); | |
this.value = ""; | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- (IE 10+, Edge, Chrome, Firefox 42+) --> | |
<input type="file" accept=".xls,.xlsx" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace Vendor\Module\Service; | |
use Magento\Framework\App\Area as AppArea; | |
use Magento\Framework\App\State as AppState; | |
use Magento\Framework\DataObject; | |
use Magento\Framework\Exception\NoSuchEntityException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="page.main.title"> | |
<action method="setPageTitle"> | |
<argument translate="true" name="title" xsi:type="string">New page title</argument> | |
</action> | |
</referenceBlock> | |
</body> | |
</page> |
OlderNewer