Skip to content

Declare module namespace before template path name #17394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function _prepareLayout()
{
$itemId = $this->getRequest()->getParam('group_id');

$this->setTemplate('system/store/delete_group.phtml');
$this->setTemplate('Magento_Backend::system/store/delete_group.phtml');
$this->setAction($this->getUrl('adminhtml/*/deleteGroupPost', ['group_id' => $itemId]));
$this->addChild(
'confirm_deletion_button',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function _prepareLayout()
{
$itemId = $this->getRequest()->getParam('website_id');

$this->setTemplate('system/store/delete_website.phtml');
$this->setTemplate('Magento_Backend::system/store/delete_website.phtml');
$this->setAction($this->getUrl('adminhtml/*/deleteWebsitePost', ['website_id' => $itemId]));
$this->addChild(
'confirm_deletion_button',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\Tree
*/
protected function _prepareLayout()
{
$this->setTemplate('catalog/category/checkboxes/tree.phtml');
$this->setTemplate('Magento_Catalog::catalog/category/checkboxes/tree.phtml');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
public function _construct()
{
parent::_construct();
$this->setTemplate('catalog/product/edit/serializer.phtml');
$this->setTemplate('Magento_Catalog::catalog/product/edit/serializer.phtml');
return $this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function _construct()
parent::_construct();
$this->setUseAjax(true);
$this->_parentTemplate = $this->getTemplate();
$this->setTemplate('tab/cart.phtml');
$this->setTemplate('Magento_Customer::tab/cart.phtml');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function _prepareLayout()
{
parent::_prepareLayout();
if (!$this->getTemplate()) {
$this->setTemplate('system/config/validatevat.phtml');
$this->setTemplate('Magento_Customer::system/config/validatevat.phtml');
}
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function _construct()
parent::_construct();

// default template location
$this->setTemplate('widget/company.phtml');
$this->setTemplate('Magento_Customer::widget/company.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Dob.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(
public function _construct()
{
parent::_construct();
$this->setTemplate('widget/dob.phtml');
$this->setTemplate('Magento_Customer::widget/dob.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Fax.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function _construct()
parent::_construct();

// default template location
$this->setTemplate('widget/fax.phtml');
$this->setTemplate('Magento_Customer::widget/fax.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Gender.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
public function _construct()
{
parent::_construct();
$this->setTemplate('widget/gender.phtml');
$this->setTemplate('Magento_Customer::widget/gender.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function _construct()
parent::_construct();

// default template location
$this->setTemplate('widget/name.phtml');
$this->setTemplate('Magento_Customer::widget/name.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Taxvat.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
public function _construct()
{
parent::_construct();
$this->setTemplate('widget/taxvat.phtml');
$this->setTemplate('Magento_Customer::widget/taxvat.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Block/Widget/Telephone.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function _construct()
parent::_construct();

// default template location
$this->setTemplate('widget/telephone.phtml');
$this->setTemplate('Magento_Customer::widget/telephone.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function _construct()
)
);

$this->setTemplate('unitofmeasure.phtml');
$this->setTemplate('Magento_Dhl::unitofmeasure.phtml');
}

/**
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Paypal/Block/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ protected function _construct()
if (in_array($paymentCode, $this->_hssHelper->getHssMethods())) {
$this->_paymentMethodCode = $paymentCode;
$templatePath = str_replace('_', '', $paymentCode);
$templateFile = "{$templatePath}/iframe.phtml";
$templateFile = "Magento_Paypal::{$templatePath}/iframe.phtml";
$directory = $this->readFactory->create($this->reader->getModuleDir('', 'Magento_Paypal'));
$file = $this->resolver->getTemplateFileName($templateFile, ['module' => 'Magento_Paypal']);
if ($file && $directory->isExist($directory->getRelativePath($file))) {
$this->setTemplate($templateFile);
} else {
$this->setTemplate('hss/iframe.phtml');
$this->setTemplate('Magento_Paypal::hss/iframe.phtml');
}
}
}
Expand Down Expand Up @@ -198,7 +198,7 @@ protected function _beforeToHtml()
protected function _toHtml()
{
if ($this->_isAfterPaymentSave()) {
$this->setTemplate('hss/js.phtml');
$this->setTemplate('Magento_Paypal::hss/js.phtml');
return parent::_toHtml();
}
if (!$this->_shouldRender) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Review/Block/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected function _construct()
);
}

$this->setTemplate('form.phtml');
$this->setTemplate('Magento_Review::form.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Review/Block/Rating/Entity/Detailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function _toHtml()
$reviewsCount = $this->_ratingFactory->create()->getTotalReviews($entityId, true);
if ($reviewsCount == 0) {
#return __('Be the first to review this product');
$this->setTemplate('empty.phtml');
$this->setTemplate('Magento_Review::empty.phtml');
return parent::_toHtml();
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/UrlRewrite/Block/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(
*/
protected function _prepareLayout()
{
$this->setTemplate('edit.phtml');
$this->setTemplate('Magento_UrlRewrite::edit.phtml');

$this->_addBackButton();
$this->_prepareLayoutFeatures();
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/User/Block/Role/Tab/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function _construct()
$roleId = $this->getRequest()->getParam('rid', false);
/** @var \Magento\User\Model\ResourceModel\User\Collection $users */
$users = $this->_userCollectionFactory->create()->load();
$this->setTemplate('role/users.phtml')
$this->setTemplate('Magento_User::role/users.phtml')
->assign('users', $users->getItems())
->assign('roleId', $roleId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

use Magento\Framework\App\ResourceConnection;
use Magento\Framework\DB\Ddl\Table;
use Magento\Framework\DB\Select;
use Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder as AggregationBuilder;
use Magento\Framework\Search\AdapterInterface;
use Magento\Framework\Search\RequestInterface;
Expand Down