Issue #2418567 by martin107: Missing IDE type hinting

8.0.x
Alex Pott 2015-02-04 10:17:38 +00:00
parent 1add90127a
commit d6c4991d73
2 changed files with 19 additions and 1 deletions

View File

@ -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)) {

View File

@ -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(