本文整理汇总了PHP中CBPActivity::ValidateProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPActivity::ValidateProperties方法的具体用法?PHP CBPActivity::ValidateProperties怎么用?PHP CBPActivity::ValidateProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBPActivity
的用法示例。
在下文中一共展示了CBPActivity::ValidateProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!is_array($arTestProperties) || !array_key_exists("VariableValue", $arTestProperties) || !is_array($arTestProperties["VariableValue"]) || count($arTestProperties["VariableValue"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "VariableValue", "message" => GetMessage("BPSVA_EMPTY_VARS"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例2: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (strlen($arTestProperties["Text"]) <= 0) {
$arErrors[] = array("code" => "emptyText", "message" => GetMessage("BPCAL_EMPTY_TEXT"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例3: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (strlen($arTestProperties["TargetStateName"]) <= 0) {
$arErrors[] = array("code" => "emptyState", "parameter" => "TargetStateName", "message" => GetMessage('BPSSA_ERROR_EMPTY_STATE'));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例4: ValidateProperties
public static function ValidateProperties($testProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$errors = array();
try {
CBPHelper::ParseDocumentId($testProperties['DocumentType']);
} catch (Exception $e) {
$errors[] = array("code" => "NotExist", "parameter" => "DocumentType", "message" => GetMessage("BPCLDA_ERROR_DT"));
}
return array_merge($errors, parent::ValidateProperties($testProperties, $user));
}
示例5: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
/*
if (strlen($arTestProperties["TargetStateTitle"]) <= 0)
{
$arErrors[] = array("code" => "emptyState", "parameter" => "TargetStateTitle", "message" => "Bad target state.");
}
*/
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例6: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if ($user == null || !$user->IsAdmin()) {
$arErrors[] = array("code" => "perm", "message" => GetMessage("BPCA_NO_PERMS"));
}
if (strlen($arTestProperties["ExecuteCode"]) <= 0) {
$arErrors[] = array("code" => "emptyCode", "message" => GetMessage("BPCA_EMPTY_CODE"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例7: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists('EventType', $arTestProperties) || strlen($arTestProperties['EventType']) <= 0) {
$arErrors[] = array('code' => 'NotExist', 'parameter' => 'EventType', 'message' => GetMessage('BPEAA_EMPTY_TYPE'));
}
if (!array_key_exists('EventText', $arTestProperties) || strlen($arTestProperties['EventText']) <= 0) {
$arErrors[] = array('code' => 'NotExist', 'EventText' => 'MessageText', 'message' => GetMessage('BPEAA_EMPTY_MESSAGE'));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例8: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("MessageUserFrom", $arTestProperties) || count($arTestProperties["MessageUserFrom"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageUserFrom", "message" => GetMessage("BPSNMA_EMPTY_FROM"));
}
if (!array_key_exists("MessageUserTo", $arTestProperties) || count($arTestProperties["MessageUserTo"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageUserTo", "message" => GetMessage("BPSNMA_EMPTY_TO"));
}
if (!array_key_exists("MessageText", $arTestProperties) || strlen($arTestProperties["MessageText"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageText", "message" => GetMessage("BPSNMA_EMPTY_MESSAGE"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例9: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("CalendarUser", $arTestProperties) || count($arTestProperties["CalendarUser"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "CalendarUser", "message" => GetMessage("BPSNMA_EMPTY_CALENDARUSER"));
}
if (!array_key_exists("CalendarName", $arTestProperties) || $arTestProperties["CalendarName"] == '') {
$arErrors[] = array("code" => "NotExist", "parameter" => "CalendarName", "message" => GetMessage("BPSNMA_EMPTY_CALENDARNAME"));
}
if (!array_key_exists("CalendarFrom", $arTestProperties) || $arTestProperties["CalendarFrom"] == '') {
$arErrors[] = array("code" => "NotExist", "parameter" => "CalendarFrom", "message" => GetMessage("BPSNMA_EMPTY_CALENDARFROM"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例10: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("GroupName", $arTestProperties) || strlen($arTestProperties["GroupName"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "GroupName", "message" => GetMessage("BPCWG_EMPTY_GROUP_NAME"));
}
if (!array_key_exists("OwnerId", $arTestProperties) || count($arTestProperties["OwnerId"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "OwnerId", "message" => GetMessage("BPCWG_EMPTY_OWNER"));
}
if (!array_key_exists("Users", $arTestProperties) || count($arTestProperties["Users"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "Users", "message" => GetMessage("BPCWG_EMPTY_USERS"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例11: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("MessageUserFrom", $arTestProperties) || count($arTestProperties["MessageUserFrom"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageUserFrom", "message" => GetMessage("BPSNMA_EMPTY_FROM"));
}
if (!array_key_exists("MessageUserTo", $arTestProperties) || count($arTestProperties["MessageUserTo"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageUserTo", "message" => GetMessage("BPSNMA_EMPTY_TO"));
}
if (!array_key_exists("MessageText", $arTestProperties) || strlen($arTestProperties["MessageText"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageText", "message" => GetMessage("BPSNMA_EMPTY_MESSAGE"));
}
global $USER;
if ($arTestProperties["MessageUserFrom"] != "user_" . $USER->GetID() && !$USER->IsAdmin() && !(CModule::IncludeModule("bitrix24") && CBitrix24::IsPortalAdmin($USER->GetID()))) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MessageUserFrom", "message" => GetMessage("BPSNMA_EMPTY_FROM"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例12: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("TaskAssignedTo", $arTestProperties) || count($arTestProperties["TaskAssignedTo"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "TaskAssignedTo", "message" => GetMessage("BPSNMA_EMPTY_TASKASSIGNEDTO"));
}
if (!array_key_exists("TaskName", $arTestProperties) || count($arTestProperties["TaskName"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "TaskName", "message" => GetMessage("BPSNMA_EMPTY_TASKNAME"));
}
if (!array_key_exists("TaskPriority", $arTestProperties) || strlen($arTestProperties["TaskPriority"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "TaskPriority", "message" => GetMessage("BPSNMA_EMPTY_TASKPRIORITY"));
}
if (!array_key_exists("TaskType", $arTestProperties) || strlen($arTestProperties["TaskType"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "TaskType", "message" => GetMessage("BPSNMA_EMPTY_TASKTYPE"));
}
//if (!array_key_exists("TaskOwnerId", $arTestProperties) || strlen($arTestProperties["TaskOwnerId"]) <= 0)
// $arErrors[] = array("code" => "NotExist", "parameter" => "TaskOwnerId", "message" => GetMessage("BPSNMA_EMPTY_TASKOWNERID"));
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例13: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if (!array_key_exists("AbsenceUser", $arTestProperties) || count($arTestProperties["AbsenceUser"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "AbsenceUser", "message" => GetMessage("BPSNMA_EMPTY_ABSENCEUSER"));
}
if (!array_key_exists("AbsenceName", $arTestProperties) || count($arTestProperties["AbsenceName"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "AbsenceName", "message" => GetMessage("BPSNMA_EMPTY_ABSENCENAME"));
}
if (!array_key_exists("AbsenceFrom", $arTestProperties) || strlen($arTestProperties["AbsenceFrom"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "AbsenceFrom", "message" => GetMessage("BPSNMA_EMPTY_ABSENCEFROM"));
}
if (!array_key_exists("AbsenceTo", $arTestProperties) || strlen($arTestProperties["AbsenceTo"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "AbsenceTo", "message" => GetMessage("BPSNMA_EMPTY_ABSENCETO"));
}
$absenceIblockId = COption::GetOptionInt("intranet", 'iblock_absence', 0);
$iblockPerm = CIBlock::GetPermission($absenceIblockId);
if ($iblockPerm < "W") {
$arErrors[] = array("code" => "perm", "message" => GetMessage("BPAA2_NO_PERMS"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}
示例14: ValidateProperties
public static function ValidateProperties($testProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$errors = array();
$activityData = self::getRestActivityData();
$properties = isset($activityData['PROPERTIES']) && is_array($activityData['PROPERTIES']) ? $activityData['PROPERTIES'] : array();
foreach ($properties as $name => $property) {
$value = isset($property['DEFAULT']) ? $property['DEFAULT'] : null;
if (isset($testProperties[$name])) {
$value = $testProperties[$name];
}
if (CBPHelper::getBool($property['REQUIRED']) && CBPHelper::isEmptyValue($value)) {
$errors[] = array('code' => 'NotExist', 'parameter' => $name, 'message' => Loc::getMessage('BPRA_PD_ERROR_EMPTY_PROPERTY', array('#NAME#' => RestActivityTable::getLocalization($property['NAME'], LANGUAGE_ID))));
}
}
if (isset($testProperties['AuthUserId']) && (string) $testProperties['AuthUserId'] !== $activityData['AUTH_USER_ID'] && !static::checkAdminPermissions()) {
$errors[] = array('code' => 'NotExist', 'parameter' => 'AuthUserId', 'message' => Loc::getMessage('BPRA_PD_ERROR_EMPTY_PROPERTY', array('#NAME#' => Loc::getMessage('BPRA_PD_USER_ID'))));
}
return array_merge($errors, parent::ValidateProperties($testProperties, $user));
}
示例15: ValidateProperties
public static function ValidateProperties($arTestProperties = array(), CBPWorkflowTemplateUser $user = null)
{
$arErrors = array();
if ((!array_key_exists("MailUserFrom", $arTestProperties) || strlen($arTestProperties["MailUserFrom"]) <= 0) && (!array_key_exists("MailUserFromArray", $arTestProperties) || count($arTestProperties["MailUserFromArray"]) <= 0)) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailUserFrom", "message" => GetMessage("BPMA_EMPTY_PROP1"));
}
if ((!array_key_exists("MailUserTo", $arTestProperties) || strlen($arTestProperties["MailUserTo"]) <= 0) && (!array_key_exists("MailUserToArray", $arTestProperties) || count($arTestProperties["MailUserToArray"]) <= 0)) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailUserTo", "message" => GetMessage("BPMA_EMPTY_PROP2"));
}
if (!array_key_exists("MailSubject", $arTestProperties) || strlen($arTestProperties["MailSubject"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailSubject", "message" => GetMessage("BPMA_EMPTY_PROP3"));
}
if (!array_key_exists("MailCharset", $arTestProperties) || strlen($arTestProperties["MailCharset"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailCharset", "message" => GetMessage("BPMA_EMPTY_PROP4"));
}
if (!array_key_exists("MailMessageType", $arTestProperties)) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailMessageType", "message" => GetMessage("BPMA_EMPTY_PROP5"));
} elseif (!in_array($arTestProperties["MailMessageType"], array("plain", "html"))) {
$arErrors[] = array("code" => "NotInRange", "parameter" => "MailMessageType", "message" => GetMessage("BPMA_EMPTY_PROP6"));
}
if (!array_key_exists("MailText", $arTestProperties) || strlen($arTestProperties["MailText"]) <= 0) {
$arErrors[] = array("code" => "NotExist", "parameter" => "MailText", "message" => GetMessage("BPMA_EMPTY_PROP7"));
}
return array_merge($arErrors, parent::ValidateProperties($arTestProperties, $user));
}