-
Notifications
You must be signed in to change notification settings - Fork 46
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
Views Sort Plugin Generator #27
Conversation
/** | ||
* Implements d8:plugin:views:sort command. | ||
*/ | ||
class Style extends BaseGenerator { |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected $description = 'Generates views sort plugin'; | |
protected $description = 'Generates a views sort plugin'; |
protected function defineOptions() { | ||
$options = parent::defineOptions(); | ||
return $options; | ||
} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
Seems not many people interested in this generator. Closing. |
No description provided.