Posted by xjm

hook_views_analyze() isn't documented. Let's fix that. :) Its purpose is basically to allow modules to display warnings to the user about their view configurations. See modules/views/lib/Drupal/views/Analyzer.php for more details. For an example, see node_views_analyze(). The documentation should be added to views.api.php

Comments

nikhil.chavan1388’s picture

Hello. I would like to work for this issue.
Is there anybody who can help me in this issue fixing? Because I am a student in 'Australian National University'. I have enrolled for a a subject named 'Free and Open Source Software Development' as a part of masters course. In this course we have to be a part of an ongoing project and make a valuable contribution to that project.I decided to contribute to the documentation part of Drupal.
Hence can anybody please help me in understanding the issue and fixing this issue.

Here are my contact details,
University email id: u5202496@anu.edu.au
Personal email id: nikhil.chavan1388@gmail.com
Contact no.: +61-435845572 (available on whatsapp)
Linkedin profile: http://www.linkedin.com/pub/nikhil-chavan/3a/765/566

xjm’s picture

Hi @nikhil.chavan1388! That sounds great. The best way to get help working on Drupal issues is to join Drupal's IRC channels: http://drupal.org/irc

You can also come to core contribution mentoring twice a week in IRC, and we will help you more there: http://drupal.org/core-mentoring

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Removing myself from the author field so I can unfollow. --xjm

eli-t’s picture

Assigned: Unassigned » eli-t
eli-t’s picture

Assigned: eli-t » Unassigned
Status: Active » Needs review
StatusFileSize
new1017 bytes

Documentation added in the attached.

dawehner’s picture

What a great example! Do you have more ideas for analysis we could do?

+++ b/core/modules/views/views.api.phpundefined
@@ -98,6 +98,26 @@
+  if ('none' == $view->display_handler->options['pager']['type']) {

Usually we swap the checks so $view... == 'none';

eli-t’s picture

Suggest putting further ideas in to a separate issue as discussed on IRC.

Wrt the ordering of the items in the comparison, putting the constant value first helps avoid accidental use of = rather than == so it's a habit of mine. I understand if it's too inconsistent with existing code style so here's another reroll the other way around.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Yeah another point is that you sort of have to keep less in mind while reading the code. Maybe this can be changed on the longrun,
but I just try to mention these kind of bits which could block the commit, so progress is made.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

Not quite:
https://drupal.org/node/1354#hooks
The first line needs to be "Analyze..."

Looks good otherwise though!

eli-t’s picture

Status: Needs work » Needs review
StatusFileSize
new1016 bytes

Rerolled using an imperative verb as suggested.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! That looks better. :)

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks again!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

fixed broken example link