You are here

17 Actions(动作)

admin 的头像
Submitted by admin on 星期四, 2015-06-18 09:46

作者:老葛,北京亚艾元软件有限责任公司,http://www.yaiyuan.com

    它是一个包装器(wrapper)元素,用来对其它按钮元素进行归类分组。把'actions'元素作为数组的键,可以方便设置主题样式,同时也方便其它模块修改该表单的动作。

 

示例代码,来自(node.admin.inc): 

$form['filters']['status']['actions'] = array(

    '#type' => 'actions',

    '#attributes' => array('class' => array('container-inline')),

  );

  $form['filters']['status']['actions']['submit'] = array(

    '#type' => 'submit',

    '#value' => count($session) ? t('Refine') : t('Filter'),

  );

 

常用属性: #access #after_build#attributes #children #id#parents#post_render #pre_render #prefix #process #states #suffix #theme#theme_wrappers #tree #type#weight


Drupal版本: