Comments

marvil07’s picture

Assigned: marvil07 » Unassigned
Status: Active » Needs review
StatusFileSize
new27.06 KB

First functional version.

mile23’s picture

Thanks, marvil07.

Right off the top...

+++ b/dbtng_example/dbtng_example.installundefined
@@ -0,0 +1,117 @@
+/**
+ * Implements hook_install().
+ *
+ * In Drupal 7, there is no need to install schema using this hook, the schema
+ * is already installed before this hook is called.

There are a couple spots where it still says 'Drupal 7.'

mile23’s picture

Status: Needs review » Needs work
marvil07’s picture

Status: Needs work » Needs review
StatusFileSize
new5.34 KB
new25.38 KB

Ok, I've made a pass on all strings, and I think now it is OK.

Also, coder tell me(on D7) it's OK from coding standards perspective.

marvil07’s picture

Status: Needs review » Fixed

Added to 8.x-1.x!

marvil07’s picture

Status: Fixed » Needs work

Re-opening as follow-up to conform documentation standards (see #1880976-4: [meta] Port examples (including submodules) to D9.4+):

- Verb tense on function descriptions.

- Files, functions, etc. need a one-line description (put additional information in a separate paragraph)

- Not all code sections in the doc blocks are in @code/@endcode tags. These will not format well on api.drupal.org.

- We don't normally have lines like this in core:
+//// Helper functions ////

- Form constructor/validate/submit handlers have special docs syntax:
http://drupal.org/node/1354#forms

marvil07’s picture

StatusFileSize
new2.08 KB

Wow, a lot of details to review, I have been reading http://drupal.org/coding-standards/docs again. It grew up a lot since the last time I checked it.

Uncompleted doc review patch attached.

wesleydv’s picture

Status: Needs work » Needs review
StatusFileSize
new3.65 KB

Created a patch that fixes the failing simpletests, this will unblock testing of other patches against the 8.x branch.

Included patch from #7 (by marvil07).

Still needs a lot of changes to be a proper Drupal 8 example.

Changing status to allow the testbot to pick it up.

marvil07’s picture

Title: Port dbtng_example to D8 » (better docs for) Port dbtng_example to D8
Status: Needs review » Needs work
StatusFileSize
new2.08 KB

@wesleydv: Thanks for the patch!
I have just added your new fix to 8.x-1.x, but I'm still leaving here the docs's patch here pending for more work.

Also, taking the chance to update the issue title to reflect better the status.

rteijeiro’s picture

Assigned: Unassigned » rteijeiro

It seems @marvil07 is not working on this issue so I will try to finish it. If I'm wrong just let me know ;)

marvil07’s picture

Yes, I usually set the Assigned issue field when I'm doing something, so feel free to continue with it ;-)

wesleydv’s picture

@rteijeiro you might also want to look at https://drupal.org/node/2074243

mile23’s picture

Just want to be sure and reference #2074243: Convert DBTNG to OOP from here.

mile23’s picture

Issue summary: View changes

Change origin issue to point at d8 port for examples issue inside this module queue

mile23’s picture

Assigned: rteijeiro » Unassigned
Issue summary: View changes

Feel free to assign yourself back if you're still working on it.

socketwench’s picture

Status: Needs work » Needs review
StatusFileSize
new4.19 KB

Fixed routing, removed hook_menu(), updated form and controller base classes.

Status: Needs review » Needs work

The last submitted patch, 15: 1868178.15.dbtngPort.patch, failed testing.

socketwench’s picture

Status: Needs work » Needs review
StatusFileSize
new4.72 KB
new636 bytes

Fixes to hook_help().

mile23’s picture

Did they change it again?? :-)

mile23’s picture

StatusFileSize
new669 bytes
new4.21 KB
+++ b/dbtng_example/dbtng_example.module
@@ -67,7 +65,7 @@ use Symfony\Component\HttpFoundation\Request;
-function dbtng_example_help($route_name, Request $request) {
+function dbtng_example_help($route_name, array $arg) {

I'm not sure about this, because of https://drupal.org/node/2250345

The example code there uses Request.

Also, I just applied this patch and after installing the module I get this error: Recoverable fatal error: Argument 2 passed to dbtng_example_help() must be of the type array, object given in dbtng_example_help() (line 68 of modules/examples/dbtng_example/dbtng_example.module).

Kind of a mystery to me how it passed the test.

Here it is with the Request object.

mile23’s picture

19: 1868178_19.patch queued for re-testing.

  • Commit 32f2e6b on 8.x-1.x authored by socketwench, committed by Mile23:
    Issue #1868178 by marvil07, socketwench, Mile23, wesleydv: (better docs...
mile23’s picture

Status: Needs review » Fixed

And we're calling that fixed.

Thanks, folks!

Status: Fixed » Closed (fixed)

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