[development] inferring which file to include based on page callback array

Moshe Weitzman weitzman at tejasa.com
Mon Jun 11 19:53:52 UTC 2007


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