-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update copyright and target blank #8
- Loading branch information
1 parent
38335f4
commit 5f8ff27
Showing
26 changed files
with
410 additions
and
136 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
namespace DevBera\CmsLinkToMenu\Block\Html\Topmenu; | ||
|
||
use Magento\Framework\Serialize\Serializer\Json; | ||
use Magento\Framework\View\Element\Template; | ||
use Magento\Framework\View\Element\Template\Context; | ||
use DevBera\CmsLinkToMenu\Api\MenuLinkManagementInterface; | ||
|
||
class Js extends Template | ||
{ | ||
/** | ||
* @var MenuLinkManagementInterface | ||
*/ | ||
private $menuLinkManagement; | ||
/** | ||
* @var Json | ||
*/ | ||
private $jsonEncoder; | ||
|
||
public function __construct( | ||
Context $context, | ||
MenuLinkManagementInterface $menuLinkManagement, | ||
Json $jsonEncoder, | ||
array $data = [] | ||
) { | ||
parent::__construct($context, $data); | ||
$this->menuLinkManagement = $menuLinkManagement; | ||
$this->jsonEncoder = $jsonEncoder; | ||
} | ||
|
||
/** | ||
* Get List of External Link list | ||
* | ||
* @return bool|false|string | ||
*/ | ||
public function getJsonLinks() | ||
{ | ||
return $this->jsonEncoder->serialize($this->menuLinkManagement->getTargetBlanksLinks()); | ||
} | ||
|
||
/** | ||
* Target Blank flag | ||
* @return int | ||
*/ | ||
public function isOpenInNewTab() | ||
{ | ||
return $this->menuLinkManagement->isOpenInTab(); | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* DevBera | ||
* | ||
* @category DevBera | ||
* @package DevBera_CmsLinkToMenu | ||
* @author Amit Bera (dev.amitbera@gmail.com) | ||
* @copyright Copyright (c) 2020 Amit Bera (https://www.amitbera.com/) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
namespace DevBera\CmsLinkToMenu\Model; | ||
|
||
class LinkTypes | ||
{ | ||
const TYPE_LEFT = 'left'; | ||
const TYPE_RIGHT = 'right'; | ||
} |
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
Oops, something went wrong.