Issue #2418567 by martin107: Missing IDE type hinting
parent
1add90127a
commit
d6c4991d73
|
|
@ -65,7 +65,7 @@ class NodeNewComments extends Numeric {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
|
||||
parent::init($view, $display, $options);
|
||||
|
|
@ -75,6 +75,9 @@ class NodeNewComments extends Numeric {
|
|||
$this->additional_fields['comment_count'] = array('table' => 'comment_entity_statistics', 'field' => 'comment_count');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function defineOptions() {
|
||||
$options = parent::defineOptions();
|
||||
|
||||
|
|
@ -83,6 +86,9 @@ class NodeNewComments extends Numeric {
|
|||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
|
||||
$form['link_to_comment'] = array(
|
||||
'#title' => $this->t('Link this field to new comments'),
|
||||
|
|
@ -94,12 +100,18 @@ class NodeNewComments extends Numeric {
|
|||
parent::buildOptionsForm($form, $form_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function query() {
|
||||
$this->ensureMyTable();
|
||||
$this->addAdditionalFields();
|
||||
$this->field_alias = $this->table . '_' . $this->field;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function preRender(&$values) {
|
||||
$user = \Drupal::currentUser();
|
||||
if ($user->isAnonymous() || empty($values)) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ use Drupal\views\ResultRow;
|
|||
*/
|
||||
class Numeric extends FieldPluginBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function defineOptions() {
|
||||
$options = parent::defineOptions();
|
||||
|
||||
|
|
@ -39,6 +42,9 @@ class Numeric extends FieldPluginBase {
|
|||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
|
||||
if (!empty($this->definition['float'])) {
|
||||
$form['set_precision'] = array(
|
||||
|
|
|
|||
Loading…
Reference in New Issue