本文整理汇总了PHP中form_edit_site_object_action::_init_dataspace方法的典型用法代码示例。如果您正苦于以下问题:PHP form_edit_site_object_action::_init_dataspace方法的具体用法?PHP form_edit_site_object_action::_init_dataspace怎么用?PHP form_edit_site_object_action::_init_dataspace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form_edit_site_object_action
的用法示例。
在下文中一共展示了form_edit_site_object_action::_init_dataspace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function _init_dataspace(&$request)
{
parent::_init_dataspace($request);
$image_variations = $this->_get_variations_ini_list();
foreach ($image_variations as $variation => $variation_data) {
if (isset($variation_data['max_size'])) {
$this->dataspace->set('upload_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
$this->dataspace->set('generate_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
}
}
}
示例2: foreach
function _init_dataspace()
{
parent::_init_dataspace();
$ini =& get_ini('image_variations.ini');
$image_variations = $ini->get_named_array();
foreach ($image_variations as $variation => $variation_data) {
if (isset($variation_data['max_size'])) {
$this->dataspace->set('upload_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
$this->dataspace->set('generate_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
}
}
}
示例3:
function _init_dataspace(&$request)
{
parent::_init_dataspace($request);
$data = $this->dataspace->export();
$user =& user::instance();
if (empty($data['comment_author'])) {
$data['comment_author'] = $user->get_login();
}
if (empty($data['comment_author_email'])) {
$data['comment_author_email'] = $user->get_email();
}
$this->dataspace->import($data);
}