Skip to content
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

How to add grid actions tutorial #270

Merged
merged 5 commits into from Sep 12, 2019
Merged

How to add grid actions tutorial #270

merged 5 commits into from Sep 12, 2019

Conversation

mickaelandrieu
Copy link
Contributor

No description provided.

@Matt75
Copy link
Contributor

Matt75 commented May 31, 2019

I don’t use dash and underscore. So module name are weird 🤢but it’s work well.

For example : https://github.com/Matt75/displayproductmanufacturer

Long name... 🤮
I hate underscore 😇

By the way, I know only native module for 1.7 using underscore... On Addons I never seen module name with dash or underscore

@mickaelandrieu
Copy link
Contributor Author

ping @PierreRambaud, everyone should be happy now!

LGTM please 🙏

public function hookActionCustomerGridDefinitionModifier(array $params)
{
// $params['definition'] is instance of \PrestaShop\PrestaShop\Core\Grid\Definition\GridDefinition
Copy link
Contributor

Choose a reason for hiding this comment

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

/** @var \PrestaShop\PrestaShop\Core\Grid\Definition\GridDefinition */
$definition = $params['definition'];

$definition>getActions()->add(

use PrestaShop\PrestaShop\Core\Grid\Action\AbstractGridAction;

/** It extends AbstractGridAction,
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace this

/** It extends AbstractGridAction,
 * but you can also implement \PrestaShop\PrestaShop\Core\Grid\Action\GridActionInterface 
 */ if for some reason you want to avoid using the abstract class

by

/**
* It extends AbstractGridAction,
* but you can also implement \PrestaShop\PrestaShop\Core\Grid\Action\GridActionInterface 
* if for some reason you want to avoid using the abstract class
*/ 

Mickaël Andrieu and others added 2 commits June 12, 2019 15:40
…h-grid-actions.md

Co-Authored-By: GoT <PierreRambaud@users.noreply.github.com>
…h-grid-actions.md

Co-Authored-By: GoT <PierreRambaud@users.noreply.github.com>
@mickaelandrieu
Copy link
Contributor Author

Hello @PierreRambaud,

I've applied your comments: LGTM?

Cheers

@mickaelandrieu
Copy link
Contributor Author

Hello @PierreRambaud,

no problem it should be good now 👍

Cheers

@matks
Copy link
Contributor

matks commented Sep 12, 2019

Thank you @mickaelandrieu

@matks matks merged commit dc78ce2 into PrestaShop:master Sep 12, 2019
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.

None yet

5 participants