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

Views Sort Plugin Generator #27

Closed

Conversation

NickDickinsonWilde
Copy link

No description provided.

/**
* Implements d8:plugin:views:sort command.
*/
class Style extends BaseGenerator {
Copy link
Owner

Choose a reason for hiding this comment

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

The class name should Sort I presume.

class Style extends BaseGenerator {

protected $name = 'd8:plugin:views:sort';
protected $description = 'Generates views sort plugin';
Copy link

Choose a reason for hiding this comment

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

Suggested change
protected $description = 'Generates views sort plugin';
protected $description = 'Generates a views sort plugin';

protected function defineOptions() {
$options = parent::defineOptions();
return $options;
}
Copy link

Choose a reason for hiding this comment

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

Do we really need the defineOptions() method defined?

/**
* {@inheritdoc}
*/
protected $usesRowPlugin = TRUE;
Copy link

Choose a reason for hiding this comment

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

I believe this is for sytle plugins only.

/**
* {@inheritdoc}
*/
protected $usesRowClass = TRUE;
Copy link

Choose a reason for hiding this comment

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

I believe this is for sytle plugins only.

/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
Copy link

Choose a reason for hiding this comment

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

This method is an exact copy of SortPluginBase::buildOptionsForm(), I dont think we need to add it to the generated plugin.

Copy link

@manuee manuee left a comment

Choose a reason for hiding this comment

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

Besides by previous comments, I believe the method most sort plugins will implement will be the query() method. I propose we add it.

@ghost
Copy link

ghost commented Aug 11, 2020

@Chi-teck
Copy link
Owner

Seems not many people interested in this generator. Closing.

@Chi-teck Chi-teck closed this May 20, 2024
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

3 participants