[development] inferring which file to include based on page callback array
Peter Wolanin
pwolanin at gmail.com
Mon Jun 11 20:10:58 UTC 2007
This seems like a little too much "magic" in terms of the file and
function naming, and perhaps too rigid as well. What if I want to
include both admin and export function in one .inc file?
-Peter
On 6/11/07, Moshe Weitzman <weitzman at tejasa.com> wrote:
> you do so based on the first part of the function. so in my example
> below, 'admin' is the part and thus system.admin.inc is known. sorry, i
> omitted that. it was buried in the issue where larry added the include
> parameter. that file would only be included if it existed, of course.
>
> Peter Wolanin wrote:
> > Moshe - how does this make sense? You no longer know which file to
> > include for the callback.
> >
> > -Peter
> >
> > On 6/11/07, Moshe Weitzman <weitzman at tejasa.com> wrote:
> >
> >> CURRENT
> >> $items['admin/build'] = array(
> >> 'title' => 'Site building',
> >> 'page callback' => 'system_admin_menu_block_page',
> >> 'file' => 'system.admin.inc',
> >>
> >> PROPOSED
> >> $items['admin/build'] = array(
> >> 'title' => 'Site building',
> >> 'page callback' => array('system, 'admin_menu_block_page'),
> >> (
> >>
> >> Note that we may still have to support a string as a page callback (i
> >> think) for non module defined callbacks.
> >>
> >>
>
More information about the development
mailing list