本文整理汇总了PHP中ca_sets::errors方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_sets::errors方法的具体用法?PHP ca_sets::errors怎么用?PHP ca_sets::errors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_sets
的用法示例。
在下文中一共展示了ca_sets::errors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveBundlesForScreen
//.........这里部分代码省略.........
}
if (isset($_FILES["{$vs_placement_code}{$vs_form_prefix}{$vs_f}"]) && $_FILES["{$vs_placement_code}{$vs_form_prefix}{$vs_f}"]) {
// media field
$this->set($vs_f, $_FILES["{$vs_placement_code}{$vs_form_prefix}{$vs_f}"]['tmp_name'], array('original_filename' => $_FILES["{$vs_placement_code}{$vs_form_prefix}{$vs_f}"]['name']));
} else {
switch ($vs_f) {
case 'access':
if ((bool) $this->getAppConfig()->get($this->tableName() . '_allow_access_inheritance') && $this->hasField('access_inherit_from_parent')) {
$this->set('access_inherit_from_parent', $po_request->getParameter("{$vs_placement_code}{$vs_form_prefix}access_inherit_from_parent", pInteger));
}
if (!(bool) $this->getAppConfig()->get($this->tableName() . '_allow_access_inheritance') || !$this->hasField('access_inherit_from_parent') || !(bool) $this->get('access_inherit_from_parent')) {
$this->set('access', $po_request->getParameter("{$vs_placement_code}{$vs_form_prefix}access", pString));
}
break;
case $vs_idno_field:
if ($this->opo_idno_plugin_instance) {
$this->opo_idno_plugin_instance->setDb($this->getDb());
$this->set($vs_f, $vs_tmp = $this->opo_idno_plugin_instance->htmlFormValue($vs_idno_field));
} else {
$this->set($vs_f, $po_request->getParameter("{$vs_placement_code}{$vs_form_prefix}{$vs_f}", pString));
}
break;
default:
// Look for fully qualified intrinsic
if (!strlen($vs_v = $po_request->getParameter("{$vs_placement_code}{$vs_form_prefix}{$vs_f}", pString))) {
// fall back to simple field name intrinsic spec - still used for "mandatory" fields such as type_id and parent_id
$vs_v = $po_request->getParameter("{$vs_f}", pString);
}
$this->set($vs_f, $vs_v);
break;
}
}
if ($this->numErrors() > 0) {
foreach ($this->errors() as $o_e) {
switch ($o_e->getErrorNumber()) {
case 795:
// field conflicts
foreach ($this->getFieldConflicts() as $vs_conflict_field) {
$po_request->addActionError($o_e, $vs_conflict_field);
}
break;
default:
$po_request->addActionError($o_e, $vs_f);
break;
}
}
}
}
}
// save attributes
$va_inserted_attributes_by_element = array();
if (isset($va_fields_by_type['attribute']) && is_array($va_fields_by_type['attribute'])) {
//
// name of attribute request parameters are:
// For new attributes
// {$vs_form_prefix}_attribute_{element_set_id}_{element_id|'locale_id'}_new_{n}
// ex. ObjectBasicForm_attribute_6_locale_id_new_0 or ObjectBasicForm_attribute_6_desc_type_new_0
//
// For existing attributes:
// {$vs_form_prefix}_attribute_{element_set_id}_{element_id|'locale_id'}_{attribute_id}
//
// look for newly created attributes; look for attributes to delete
$va_inserted_attributes = array();
$reserved_elements = array();
foreach ($va_fields_by_type['attribute'] as $vs_placement_code => $vs_f) {
$vs_element_set_code = preg_replace("/^ca_attribute_/", "", $vs_f);