Всем привет!
Может кто-то подскажет почему не срабатывает последний callback в коде? У drupal какие-то ограничения на длину пути???
function image_watermark_menu() {
$items = array();
$items['admin/config/media/image_watermark/config_form'] = array(
'title' => 'Image watermark settings',
'description' => 'Image watermark settings',
'page callback' => 'drupal_get_form',
'page arguments' => array('image_watermark_config_form'),
'access arguments' => array('administer site configuration'),
'file' => 'image_watermark.admin.inc',
);
$directory_path = file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath();
$count = count(explode('/', $directory_path));
$items[$directory_path . '/styles/%image_style/public/image_watermark_move'] = array(
'title' => 'Generate image style',
'page callback' => 'image_watermark_style_deliver',
'page arguments' => array($count + 1, $count + 2, $count + 3, $count + 4),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items[$directory_path . '/styles/%image_style/public/image_watermark_no_watermark'] = array(
'title' => 'Generate image style',
'page callback' => 'image_watermark_style_deliver',
'page arguments' => array($count + 1, $count + 2, $count + 3),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items[$directory_path . '/styles/%image_style/public/image_watermark/private/field/image'] = array(
'title' => 'Generate image style',
'page callback' => 'image_watermark_style_deliver',
'page arguments' => array($count + 1, $count + 2, $count + 3),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
У меня apache2.4/php7/mysql5/drupal7