本文整理汇总了PHP中ArrayUtil::getArrayValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::getArrayValue方法的具体用法?PHP ArrayUtil::getArrayValue怎么用?PHP ArrayUtil::getArrayValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::getArrayValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDetails
public function actionDetails($id)
{
$contact = static::getModelAndCatchNotFoundAndDisplayError('Contact', intval($id));
ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($contact);
if (!LeadsUtil::isStateALead($contact->state)) {
$urlParams = array('/contacts/' . $this->getId() . '/details', 'id' => $contact->id);
$this->redirect($urlParams);
} else {
AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_VIEWED, array(strval($contact), 'LeadsModule'), $contact);
$getData = GetUtil::getData();
$isKanbanBoardInRequest = ArrayUtil::getArrayValue($getData, 'kanbanBoard');
if ($isKanbanBoardInRequest == 0 || $isKanbanBoardInRequest == null || Yii::app()->userInterface->isMobile() === true) {
$breadCrumbView = StickySearchUtil::resolveBreadCrumbViewForDetailsControllerAction($this, 'LeadsSearchView', $contact);
$detailsAndRelationsView = $this->makeDetailsAndRelationsView($contact, 'LeadsModule', 'LeadDetailsAndRelationsView', Yii::app()->request->getRequestUri(), $breadCrumbView);
$view = new LeadsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $detailsAndRelationsView));
} else {
$kanbanItem = new KanbanItem();
$kanbanBoard = new TaskKanbanBoard($kanbanItem, 'type', $contact, get_class($contact));
$kanbanBoard->setIsActive();
$params['relationModel'] = $contact;
$params['relationModuleId'] = $this->getModule()->getId();
$params['redirectUrl'] = null;
$listView = new TasksForLeadKanbanView($this->getId(), 'tasks', 'Task', null, $params, null, array(), $kanbanBoard);
$view = new LeadsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $listView));
}
echo $view->render();
}
}
示例2: renderControlContentNonEditable
protected function renderControlContentNonEditable()
{
if (!isset($this->properties['backend']['services'])) {
return null;
}
$content = null;
$sizeClass = null;
if (isset($this->properties['backend']['sizeClass'])) {
$sizeClass = $this->properties['backend']['sizeClass'];
}
foreach ($this->properties['backend']['services'] as $serviceName => $serviceDetails) {
if (ArrayUtil::getArrayValue($serviceDetails, 'enabled') and ArrayUtil::getArrayValue($serviceDetails, 'url')) {
$properties = array();
$properties['frontend']['href'] = $serviceDetails['url'];
$properties['frontend']['target'] = '_blank';
$properties['backend']['text'] = $serviceName;
$properties['backend']['sizeClass'] = 'button social-button ' . $serviceName . ' ' . $sizeClass;
$id = $this->id . '_' . $serviceName;
$element = BuilderElementRenderUtil::resolveElement('BuilderSocialButtonElement', $this->renderForCanvas, $id, $properties);
$content .= $element->renderNonEditable();
$content .= $this->resolveSpacerContentForVerticalLayout();
$content .= $this->resolveTdCloseAndOpenContentForHorizontalLayout();
}
}
return $content;
}
示例3: resolveEmailMessageFromPostData
/**
* Given post data and an email message, populate the sender and account on the email message if possible.
* Also add message recipients and any attachments.
* @param array $postData
* @param CreateEmailMessageForm $emailMessageForm
* @param User $userToSendMessagesFrom
* @return CreateEmailMessageForm
*/
public static function resolveEmailMessageFromPostData(array &$postData, CreateEmailMessageForm $emailMessageForm, User $userToSendMessagesFrom)
{
$postVariableName = get_class($emailMessageForm);
$toRecipients = explode(",", $postData[$postVariableName]['recipientsData']['to']);
// Not Coding Standard
static::attachRecipientsToMessage($toRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_TO);
if (ArrayUtil::getArrayValue($postData[$postVariableName]['recipientsData'], 'cc') != null) {
$ccRecipients = explode(",", $postData[$postVariableName]['recipientsData']['cc']);
// Not Coding Standard
static::attachRecipientsToMessage($ccRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_CC);
}
if (ArrayUtil::getArrayValue($postData[$postVariableName]['recipientsData'], 'bcc') != null) {
$bccRecipients = explode(",", $postData[$postVariableName]['recipientsData']['bcc']);
// Not Coding Standard
static::attachRecipientsToMessage($bccRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_BCC);
}
if (isset($postData['filesIds'])) {
static::attachFilesToMessage($postData['filesIds'], $emailMessageForm->getModel());
}
$emailAccount = EmailAccount::getByUserAndName($userToSendMessagesFrom);
$sender = new EmailMessageSender();
$sender->fromName = $emailAccount->fromName;
$sender->fromAddress = $emailAccount->fromAddress;
$sender->personsOrAccounts->add($userToSendMessagesFrom);
$emailMessageForm->sender = $sender;
$emailMessageForm->account = $emailAccount;
$box = EmailBoxUtil::getDefaultEmailBoxByUser($userToSendMessagesFrom);
$emailMessageForm->folder = EmailFolder::getByBoxAndType($box, EmailFolder::TYPE_OUTBOX);
return $emailMessageForm;
}
示例4: resolveNonEditableWrapperHtmlOptions
protected function resolveNonEditableWrapperHtmlOptions()
{
$htmlOptions = parent::resolveNonEditableWrapperHtmlOptions();
$htmlOptions['class'] .= ' button-wrapper';
$htmlOptions['align'] = ArrayUtil::getArrayValue($this->properties['backend'], 'align');
return $htmlOptions;
}
示例5: resolveEmailMessageFromPostData
/**
* Given post data and an email message, populate the sender and account on the email message if possible.
* Also add message recipients and any attachments.
* @param array $postData
* @param EmailMessage $emailMessage
* @param User $userToSendMessagesFrom
* @return boolean
*/
public static function resolveEmailMessageFromPostData(array &$postData, CreateEmailMessageForm $emailMessageForm, User $userToSendMessagesFrom)
{
$postVariableName = get_class($emailMessageForm);
Yii::app()->emailHelper->loadOutboundSettingsFromUserEmailAccount($userToSendMessagesFrom);
$toRecipients = explode(",", $postData[$postVariableName]['recipientsData']['to']);
// Not Coding Standard
static::attachRecipientsToMessage($toRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_TO);
if (ArrayUtil::getArrayValue($postData[$postVariableName]['recipientsData'], 'cc') != null) {
$ccRecipients = explode(",", $postData[$postVariableName]['recipientsData']['cc']);
// Not Coding Standard
static::attachRecipientsToMessage($ccRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_CC);
}
if (ArrayUtil::getArrayValue($postData[$postVariableName]['recipientsData'], 'bcc') != null) {
$bccRecipients = explode(",", $postData[$postVariableName]['recipientsData']['bcc']);
// Not Coding Standard
static::attachRecipientsToMessage($bccRecipients, $emailMessageForm->getModel(), EmailMessageRecipient::TYPE_BCC);
}
if (isset($postData['filesIds'])) {
static::attachFilesToMessage($postData['filesIds'], $emailMessageForm->getModel());
}
$emailAccount = EmailAccount::getByUserAndName($userToSendMessagesFrom);
$sender = new EmailMessageSender();
$sender->fromName = Yii::app()->emailHelper->fromName;
$sender->fromAddress = Yii::app()->emailHelper->fromAddress;
$sender->personOrAccount = $userToSendMessagesFrom;
$emailMessageForm->sender = $sender;
$emailMessageForm->account = $emailAccount;
$emailMessageForm->content->textContent = EmailMessageUtil::resolveTextContent(ArrayUtil::getArrayValue($postData[$postVariableName]['content'], 'htmlContent'), null);
$box = EmailBox::resolveAndGetByName(EmailBox::NOTIFICATIONS_NAME);
$emailMessageForm->folder = EmailFolder::getByBoxAndType($box, EmailFolder::TYPE_OUTBOX);
return $emailMessageForm;
}
示例6: renderControlEditable
/**
* Renders the editable dropdown content.
* @return A string containing the element's content.
*/
protected function renderControlEditable()
{
if (ArrayUtil::getArrayValue($this->params, 'defaultToBlank')) {
return ZurmoHtml::dropDownList($this->getNameForSelectInput(), null, $this->getDropDownArray(), $this->resolveHtmlOptions());
} else {
return $this->form->dropDownList($this->model->{$this->attribute}->currency, 'id', $this->getDropDownArray(), $this->resolveHtmlOptions());
}
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:CurrencyIdForAModelsRelatedCurrencyValueDropDownElement.php
示例7: setMetadataFromPost
/**
* Supports setting metadata on both models. The MyListForm model and the SearchModel
* @see ModalConfigEditView::setMetadataFromPost()
*/
public function setMetadataFromPost($postArray)
{
parent::setMetadataFromPost($postArray);
$sanitizedPostArray = PostUtil::sanitizePostByDesignerTypeForSavingModel($this->searchModel, ArrayUtil::getArrayValue($_POST, $this->getSearchModelPostArrayName()));
$searchAttributes = SearchUtil::getSearchAttributesFromSearchArrayForSavingExistingSearchCriteria($sanitizedPostArray);
$searchAttributesAdaptedToSetInModel = SearchUtil::adaptSearchAttributesToSetInRedBeanModel($searchAttributes, $this->searchModel);
$this->searchAttributes = $searchAttributesAdaptedToSetInModel;
}
示例8: getAddBlank
protected function getAddBlank()
{
if (ArrayUtil::getArrayValue($this->params, 'addBlank')) {
return true;
} else {
return false;
}
}
示例9: renderEditable
/**
* Override from parent class in order to
* accomodate the 'wide' param option.
* @return The element's content.
*/
protected function renderEditable()
{
$data = array();
$data['label'] = $this->renderLabel();
$data['content'] = $this->renderControlEditable();
$data['error'] = $this->renderError();
$data['colspan'] = ArrayUtil::getArrayValue($this->params, 'wide') ? 3 : 1;
return $this->resolveContentTemplate($this->editableTemplate, $data);
}
示例10: isKanbanRequest
/**
* Check if the request is to display kanban view
* @return boolean
*/
public static function isKanbanRequest()
{
$getData = GetUtil::getData();
$isKanbanBoardInRequest = ArrayUtil::getArrayValue($getData, 'kanbanBoard');
if ($isKanbanBoardInRequest == 0 || $isKanbanBoardInRequest == null || Yii::app()->userInterface->isMobile() === true) {
return false;
}
return true;
}
示例11: resolveBreadCrumbViewForDetailsControllerAction
/**
* @param CController $controller
* @param $stickySearchKey
* @param RedBeanModel $model
* @return mixed
*/
public static function resolveBreadCrumbViewForDetailsControllerAction(CController $controller, $stickySearchKey, RedBeanModel $model)
{
assert('is_string($stickySearchKey)');
if (ArrayUtil::getArrayValue(GetUtil::getData(), 'stickyOffset') !== null && StickySearchUtil::getDataByKey($stickySearchKey) != null) {
$stickyLoadUrl = Yii::app()->createUrl($controller->getModule()->getId() . '/' . $controller->getId() . '/renderStickyListBreadCrumbContent', array('stickyKey' => $stickySearchKey, 'stickyOffset' => ArrayUtil::getArrayValue(GetUtil::getData(), 'stickyOffset'), 'stickyModelId' => $model->id));
} else {
$stickyLoadUrl = null;
}
$className = static::resolveStickyDetailsAndRelationsBreadCrumbViewClassName();
return new $className($controller->getId(), $controller->getModule()->getId(), static::resolveBreadcrumbLinks($model), $controller->getModule()->getModuleLabelByTypeAndLanguage('Plural'), $stickyLoadUrl);
}
示例12: getZurmoControllerUtil
protected static function getZurmoControllerUtil()
{
$getData = GetUtil::getData();
$relatedUserId = ArrayUtil::getArrayValue($getData, 'relatedUserId');
if ($relatedUserId == null) {
$relatedUser = null;
} else {
$relatedUser = User::getById((int) $relatedUserId);
}
return new SocialItemZurmoControllerUtil($relatedUser);
}
示例13: resolveNonEditableWrapperHtmlOptions
protected function resolveNonEditableWrapperHtmlOptions()
{
$parentOptions = parent::resolveNonEditableWrapperHtmlOptions();
$columnLength = ArrayUtil::getArrayValue($this->params, static::TABLE_CSS_CLASSES_PARAM_KEY);
if (!isset($columnLength)) {
$columnLength = BuilderRowElement::MAX_COLUMN_WIDTH;
$columnLength = NumberToWordsUtil::convert($columnLength);
}
$parentOptions['class'] .= " {$columnLength} columns";
return $parentOptions;
}
示例14: renderControlEditable
/**
* Renders the editable email address content.
* Takes the model attribute value and converts it into
* at most 3 items. Email Address display, Opt Out checkbox,
* and Invalid Email checkbox.
* @return A string containing the element's content
*/
protected function renderControlEditable()
{
assert('$this->model->{$this->attribute} instanceof Email');
$addressModel = $this->model->{$this->attribute};
$content = $this->renderEditableEmailAddressTextField($addressModel, $this->form, $this->attribute, 'emailAddress') . "\n";
if (ArrayUtil::getArrayValue($this->params, 'hideOptOut') != true) {
$content = ZurmoHtml::tag('div', array('class' => 'beforeOptOutCheckBox'), '<div>' . $content . '</div>');
$content .= $this->renderEditableEmailAddressCheckBoxField($addressModel, $this->form, $this->attribute, 'optOut') . "\n";
}
return $content;
}
示例15: renderNewSocialItemContent
protected function renderNewSocialItemContent()
{
if (ArrayUtil::getArrayValue(GetUtil::getData(), 'ajax') != null) {
return;
}
$socialItem = new SocialItem();
$urlParameters = array('redirectUrl' => $this->getPortletDetailsUrl());
//After save, the url to go to.
$uniquePageId = get_called_class();
$inlineView = new SocialItemInlineEditView($socialItem, 'default', 'socialItems', 'inlineCreateSave', $urlParameters, $uniquePageId);
return $inlineView->render();
}