Conversation
AartiJogiya
reviewed
Mar 10, 2021
| namespace Salecto\Advertisment\Block\Adminhtml\Advertisment\Edit; | ||
|
|
||
| use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; | ||
| use Magento\Catalog\Block\Adminhtml\Category\AbstractCategory; |
|
|
||
| namespace Salecto\Advertisment\Block\Adminhtml\Advertisment\Edit; | ||
|
|
||
| use Magento\Search\Controller\RegistryConstants; |
There was a problem hiding this comment.
RegistryConstants is not used in class anywhere
| public function getId() | ||
| { | ||
| $contact = $this->registry->registry('contact'); | ||
| return $contact ? $contact->getId() : null; |
There was a problem hiding this comment.
Can be modified as $contact = $this->registry->registry('contact') ? $contact->getId() : null;
| namespace Salecto\Advertisment\Block\Adminhtml\Advertisment\Edit; | ||
|
|
||
| use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; | ||
| use Magento\Catalog\Block\Adminhtml\Category\AbstractCategory; |
| ) { | ||
| $this->_adverts = $adverts; | ||
| $this->_storeManager = $storeManager; | ||
| $this->_DateTime = $DateTime; |
There was a problem hiding this comment.
it should be $this->_dateTime = $dateTime
| * @param array $data | ||
| */ | ||
| public function __construct( | ||
| DateTime $DateTime, |
| </arguments> | ||
| </type> | ||
|
|
||
|
|
There was a problem hiding this comment.
Correct indentation and remove extra space
| $adverts = $block->getAdverts($currentPage); | ||
|
|
||
| if(count($adverts) > 0): ?> | ||
| <div> |
There was a problem hiding this comment.
correct the indentations and check https://devdocs.magento.com/guides/v2.3/coding-standards/code-standard-php.html
| echo '<div style="float: left">'; | ||
| echo '<div> <img src="'.$block->getMediaUrl($advert->getAdImg()).'"></div>'; | ||
| echo "<div>" .$advert->getTitle(). "</div>"; | ||
| //echo "<div>" .$advert->getAdDescription(). "</div>"; |
| use Symfony\Component\Console\Output\OutputInterface; | ||
| use Salecto\Advertisment\Model\GridModelFactory; | ||
| /** | ||
| * Class SomeCommand |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.