totten / civix

CiviCRM Extension Builder
http://civicrm.org/
Other
56 stars 56 forks source link

Superficial fixes to form template - hints, array syntax #313

Closed eileenmcnaughton closed 1 year ago

eileenmcnaughton commented 1 year ago

This function is pretty prevalent in civix generated stuff - could be a mixin or core function - but probably just getting it to nice arrays etc is a step forwards

After running it the only php grumble is it can't see that the class is called - @totten would be cool if your phpstorm extension could pick up that xml declarations make it called - but I assume that's a big lift

image

totten commented 1 year ago

Patch looks good. Test-run is happy. (I'm pretty any hard-to-see typos would cause a failure.) Let's merge.

After running it the only php grumble is it can't see that the class is called - @totten would be cool if your phpstorm extension could pick up that xml declarations make it called - but I assume that's a big lift

<?php
// AUTO-GENERATED: This mirrors the routing table so that the IDE gives some more hints about usage.

define('CORE', '/home/totten/bknix/build/dmaster/web/sites/all/modules/civicrm');
$routes = [
  [
    'path' => 'civicrm/contact/view/activity',
    'page_callback' => ['CRM_Activity_Page_Tab', 'run'],
    '_source' => include(CORE . '/CRM/Core/xml/Menu/Contact.xml'),
    // We don't really care to include(), but PhpStorm supports drill-down on static include() calls, so this facilitates code-navigation.
  ]
];