Skip to content

Commit

Permalink
Merge pull request #1551 from magento-engcom/2.2-develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#11229
#11223
#11168
  • Loading branch information
Oleksii Korshenko authored Oct 4, 2017
2 parents 268dce1 + a0d2a7d commit 9db4501
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@

class Index extends \Magento\Backend\App\Action
{
/**
* Array of actions which can be processed without secret key validation
*
* @var string[]
*/
protected $_publicActions = ['index'];

/**
* @var \Magento\Framework\View\Result\PageFactory
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ $_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

$renderLabel = true;
// if defined as 'none' in layout, do not render
if ($_attributeLabel == 'none') {
$renderLabel = false;
}

if ($_attributeLabel && $_attributeLabel == 'default') {
$_attributeLabel = $_product->getResource()->getAttribute($_code)->getStoreLabel();
}
Expand All @@ -31,10 +37,9 @@ if ($_attributeType && $_attributeType == 'text') {
$_attributeValue = $_helper->productAttribute($_product, $_product->$_call(), $_code);
}
?>

<?php if ($_attributeValue): ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
<?php if ($_attributeLabel != 'none'): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<?php if ($renderLabel): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></div>
</div>
<?php endif; ?>
14 changes: 14 additions & 0 deletions app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ class Collection extends AbstractCollection
*/
protected $_idFieldName = 'block_id';

/**
* Event prefix
*
* @var string
*/
protected $_eventPrefix = 'cms_block_collection';

/**
* Event object
*
* @var string
*/
protected $_eventObject = 'block_collection';

/**
* Perform operations after collection load
*
Expand Down
14 changes: 14 additions & 0 deletions app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ class Collection extends AbstractCollection
*/
protected $_previewFlag;

/**
* Event prefix
*
* @var string
*/
protected $_eventPrefix = 'cms_page_collection';

/**
* Event object
*
* @var string
*/
protected $_eventObject = 'page_collection';

/**
* Define resource model
*
Expand Down

0 comments on commit 9db4501

Please sign in to comment.