Skip to content

For review advertisement repository#1

Open
vac19 wants to merge 1 commit into
mainfrom
reviewer
Open

For review advertisement repository#1
vac19 wants to merge 1 commit into
mainfrom
reviewer

Conversation

@vac19

@vac19 vac19 commented Mar 3, 2021

Copy link
Copy Markdown
Owner

No description provided.

namespace Salecto\Advertisment\Block\Adminhtml\Advertisment\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
use Magento\Catalog\Block\Adminhtml\Category\AbstractCategory;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used anywhere in this class


namespace Salecto\Advertisment\Block\Adminhtml\Advertisment\Edit;

use Magento\Search\Controller\RegistryConstants;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RegistryConstants is not used in class anywhere

public function getId()
{
$contact = $this->registry->registry('contact');
return $contact ? $contact->getId() : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used anywere

Comment thread Block/Adverts.php
) {
$this->_adverts = $adverts;
$this->_storeManager = $storeManager;
$this->_DateTime = $DateTime;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be $this->_dateTime = $dateTime

* @param array $data
*/
public function __construct(
DateTime $DateTime,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name should be $dateTime

Comment thread etc/di.xml
</arguments>
</type>


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct indentation and remove extra space

$adverts = $block->getAdverts($currentPage);

if(count($adverts) > 0): ?>
<div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo '<div style="float: left">';
echo '<div> <img src="'.$block->getMediaUrl($advert->getAdImg()).'"></div>';
echo "<div>" .$advert->getTitle(). "</div>";
//echo "<div>" .$advert->getAdDescription(). "</div>";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unnecessary code

Comment thread Console/Adverts.php
use Symfony\Component\Console\Output\OutputInterface;
use Salecto\Advertisment\Model\GridModelFactory;
/**
* Class SomeCommand

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct the class name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants