当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseElementModel::defineAttributes方法代码示例

本文整理汇总了PHP中BaseElementModel::defineAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseElementModel::defineAttributes方法的具体用法?PHP BaseElementModel::defineAttributes怎么用?PHP BaseElementModel::defineAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseElementModel的用法示例。


在下文中一共展示了BaseElementModel::defineAttributes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     // Craft email settings
     $settings = craft()->email->getSettings();
     $systemEmail = !empty($settings['emailAddress']) ? $settings['emailAddress'] : '';
     $systemName = !empty($settings['senderName']) ? $settings['senderName'] : '';
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'fieldLayoutId' => AttributeType::Number, 'redirectEntryId' => AttributeType::Number, 'name' => AttributeType::String, 'handle' => AttributeType::String, 'titleFormat' => array(AttributeType::String, 'default' => "{dateCreated|date('D, d M Y H:i:s')}"), 'submitAction' => AttributeType::String, 'submitButton' => AttributeType::String, 'afterSubmitText' => AttributeType::Mixed, 'submissionEnabled' => array(AttributeType::Bool, 'default' => true), 'sendCopy' => array(AttributeType::Bool, 'default' => false), 'sendCopyTo' => AttributeType::String, 'notificationEnabled' => array(AttributeType::Bool, 'default' => true), 'notificationFilesEnabled' => array(AttributeType::Bool, 'default' => false), 'notificationRecipients' => array(AttributeType::String, 'default' => $systemEmail), 'notificationSubject' => array(AttributeType::String, 'default' => Craft::t('{formName} form was submitted')), 'notificationSenderName' => array(AttributeType::String, 'default' => $systemName), 'notificationSenderEmail' => array(AttributeType::String, 'default' => $systemEmail), 'notificationReplyToEmail' => array(AttributeType::String, 'default' => $systemEmail), 'formTemplate' => AttributeType::String, 'tabTemplate' => AttributeType::String, 'fieldTemplate' => AttributeType::String, 'notificationTemplate' => AttributeType::String));
 }
开发者ID:webremote,项目名称:amforms,代码行数:12,代码来源:AmForms_FormModel.php

示例2: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('customerName' => array(AttributeType::String, 'required' => true, 'label' => 'Name'), 'customerEmail' => array(AttributeType::Email, 'required' => true, 'label' => 'Email'), 'cardToken' => array(AttributeType::String, 'required' => true, 'label' => 'Stripe Card Token'), 'cardName' => array(AttributeType::String, 'label' => 'Cardholder Name'), 'cardAddressLine1' => array(AttributeType::String, 'label' => 'Card Address 1'), 'cardAddressLine2' => array(AttributeType::String, 'label' => 'Card Address 2'), 'cardAddressCity' => array(AttributeType::String, 'label' => 'Card Address City'), 'cardAddressState' => array(AttributeType::String, 'label' => 'Card Address State'), 'cardAddressZip' => array(AttributeType::String, 'label' => 'Card Address Zip'), 'cardAddressCountry' => array(AttributeType::String, 'label' => 'Card Address Country'), 'cardLast4' => array(AttributeType::String, 'label' => 'Card Last 4'), 'cardType' => array(AttributeType::String, 'label' => 'Card Type'), 'cardExpMonth' => array(AttributeType::String, 'label' => 'Card Expiry Month'), 'cardExpYear' => array(AttributeType::String, 'label' => 'Card Expiry Year'), 'planAmount' => array(AttributeType::Number, 'required' => true, 'label' => 'Amount', 'decimals' => 2), 'planCurrency' => array(AttributeType::String, 'label' => 'Currency'), 'planInterval' => array(AttributeType::String, 'label' => 'Plan Interval'), 'planIntervalCount' => array(AttributeType::Number, 'label' => 'Plan Interval Count'), 'planType' => array(AttributeType::Enum, 'values' => 'charge, recuring', 'label' => 'Plan Type'), 'planName' => array(AttributeType::String), 'planCoupon' => array(AttributeType::String), 'planCouponStripeId' => array(AttributeType::String), 'planDiscount' => array(AttributeType::Number), 'planFullAmount' => array(AttributeType::Number), 'hasDiscount' => array(AttributeType::Bool, 'label' => 'Has a Discount?'), 'description' => array(AttributeType::String, 'label' => 'Description'), 'hash' => array(AttributeType::String, 'label' => 'Hash'), 'stripe' => array(AttributeType::String, 'label' => 'Stripe Data'), 'mode' => array(AttributeType::Enum, 'values' => 'test,live', 'label' => 'Transaction Mode'), 'sourceUrl' => array(AttributeType::Url, 'label' => 'Source URL'), 'userId' => array(AttributeType::Number, 'label' => 'User ID'), 'timestamp' => array(AttributeType::DateTime, 'label' => 'Time'), 'notes' => array(AttributeType::String), 'stripeCustomerId' => array(AttributeType::String), 'stripeChargeId' => array(AttributeType::String), 'meta' => array(AttributeType::Mixed), 'stripeAccountBalance' => array(AttributeType::Number, 'label' => 'Account Balance')));
 }
开发者ID:jamiepittock,项目名称:WhereForArt,代码行数:4,代码来源:ChargeModel.php

示例3: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => craft()->language), 'elementId' => array(AttributeType::Number, 'default' => 0), 'metaType' => array(AttributeType::Enum, 'values' => "default,template", 'default' => 'template'), 'metaPath' => array(AttributeType::String, 'default' => ''), 'seoMainEntityCategory' => array(AttributeType::String, 'default' => 'CreativeWork'), 'seoMainEntityOfPage' => array(AttributeType::String, 'default' => 'WebPage'), 'seoTitle' => array(AttributeType::String, 'default' => ''), 'seoDescription' => array(AttributeType::String, 'default' => ''), 'seoKeywords' => array(AttributeType::String, 'default' => ''), 'seoImageTransform' => array(AttributeType::String, 'default' => ''), 'seoFacebookImageTransform' => array(AttributeType::String, 'default' => ''), 'seoTwitterImageTransform' => array(AttributeType::String, 'default' => ''), 'twitterCardType' => array(AttributeType::String, 'default' => ''), 'openGraphType' => array(AttributeType::String, 'default' => ''), 'robots' => array(AttributeType::String, 'default' => ''), 'seoImageId' => array(AttributeType::Number, 'default' => null), 'seoTwitterImageId' => array(AttributeType::Number, 'default' => null), 'seoFacebookImageId' => array(AttributeType::Number, 'default' => null)));
 }
开发者ID:nystudio107,项目名称:seomatic,代码行数:8,代码来源:Seomatic_MetaModel.php

示例4: defineAttributes

 /**
  * @inheritDoc BaseModel::defineAttributes()
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('sourceId' => AttributeType::Number, 'folderId' => AttributeType::Number, 'filename' => AttributeType::String, 'originalName' => AttributeType::String, 'kind' => AttributeType::String, 'width' => AttributeType::Number, 'height' => AttributeType::Number, 'size' => AttributeType::Number, 'dateModified' => AttributeType::DateTime));
 }
开发者ID:amite,项目名称:arc-va,代码行数:9,代码来源:AssetFileModel.php

示例5: defineAttributes

 /**
  * @inheritDoc BaseModel::defineAttributes()
  *
  * @return array
  */
 protected function defineAttributes()
 {
     $requireUsername = !craft()->config->get('useEmailAsUsername');
     return array_merge(parent::defineAttributes(), array('username' => array(AttributeType::String, 'maxLength' => 100, 'required' => $requireUsername), 'photo' => array(AttributeType::String, 'maxLength' => 100), 'firstName' => AttributeType::String, 'lastName' => AttributeType::String, 'email' => array(AttributeType::Email, 'required' => !$requireUsername), 'password' => AttributeType::String, 'preferredLocale' => AttributeType::Locale, 'weekStartDay' => array(AttributeType::Number, 'default' => craft()->config->get('defaultWeekStartDay')), 'admin' => AttributeType::Bool, 'client' => AttributeType::Bool, 'locked' => AttributeType::Bool, 'suspended' => AttributeType::Bool, 'pending' => AttributeType::Bool, 'archived' => AttributeType::Bool, 'lastLoginDate' => AttributeType::DateTime, 'invalidLoginCount' => AttributeType::Number, 'lastInvalidLoginDate' => AttributeType::DateTime, 'lockoutDate' => AttributeType::DateTime, 'passwordResetRequired' => AttributeType::Bool, 'lastPasswordChangeDate' => AttributeType::DateTime, 'unverifiedEmail' => AttributeType::Email, 'newPassword' => AttributeType::String, 'currentPassword' => AttributeType::String, 'verificationCodeIssuedDate' => AttributeType::DateTime));
 }
开发者ID:paulcarvill,项目名称:Convergence-craft,代码行数:10,代码来源:UserModel.php

示例6: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => array(AttributeType::Number), 'elementId' => array(AttributeType::Number, 'required' => true), 'elementType' => array(AttributeType::String, 'required' => true), 'listId' => array(AttributeType::Number), 'listName' => array('AttrributeType::String', 'required' => true), 'public' => array(AttributeType::Bool, 'default' => true), 'type' => array(AttributeType::String, 'label' => 'Item Type'), 'sortOrder' => array(AttributeType::Number), 'inList' => array(AttributeType::Bool, 'required' => true, 'default' => false), 'otherLists' => array(AttributeType::Mixed)));
 }
开发者ID:jamiepittock,项目名称:WhereForArt,代码行数:4,代码来源:Shortlist_ItemModel.php

示例7: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('eid' => AttributeType::Number, 'eventid' => AttributeType::Number, 'startDate' => AttributeType::DateTime, 'order' => array(AttributeType::String, 'default' => 'venti.startDate asc'), 'endDate' => AttributeType::DateTime, 'allDay' => AttributeType::Number, 'repeat' => AttributeType::Number, 'rRule' => AttributeType::String, 'summary' => AttributeType::String, 'isrepeat' => AttributeType::Number, 'locale' => AttributeType::String, 'postDate' => AttributeType::DateTime, 'expiryDate' => AttributeType::DateTime));
 }
开发者ID:codeforamerica,项目名称:oakland-beta,代码行数:4,代码来源:Venti_OutputModel.php

示例8: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'groupId' => AttributeType::Number, 'fieldLayoutId' => AttributeType::Number, 'name' => AttributeType::String, 'handle' => AttributeType::String, 'titleFormat' => AttributeType::String, 'displaySectionTitles' => array(AttributeType::Bool, 'default' => false), 'redirectUri' => AttributeType::String, 'submitAction' => AttributeType::String, 'submitButtonText' => AttributeType::String, 'notificationEnabled' => array(AttributeType::Bool, 'default' => false), 'notificationRecipients' => AttributeType::String, 'notificationSubject' => AttributeType::String, 'notificationSenderName' => AttributeType::String, 'notificationSenderEmail' => AttributeType::String, 'notificationReplyToEmail' => AttributeType::String, 'ownerId' => AttributeType::Number, 'oldHandle' => AttributeType::String));
 }
开发者ID:aladrach,项目名称:Bluefoot-Craft-Starter,代码行数:8,代码来源:SproutForms_FormModel.php

示例9: defineAttributes

 /**
  * Return the model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'type' => AttributeType::String, 'userId' => AttributeType::Number, 'origin' => AttributeType::String, 'before' => AttributeType::Mixed, 'after' => AttributeType::Mixed, 'diff' => AttributeType::Mixed, 'status' => AttributeType::String));
 }
开发者ID:webremote,项目名称:auditlog,代码行数:9,代码来源:AuditLogModel.php

示例10: defineAttributes

 /**
  * @return array
  */
 protected function defineAttributes()
 {
     $defaults = parent::defineAttributes();
     $attributes = array('subjectLine' => array(AttributeType::String, 'required' => true), 'campaignId' => array(AttributeType::Number, 'required' => true), 'recipients' => array(AttributeType::Mixed, 'required' => false), 'fromName' => array(AttributeType::String, 'minLength' => 2, 'maxLength' => 100, 'required' => false), 'fromEmail' => array(AttributeType::String, 'minLength' => 6, 'required' => false), 'replyTo' => array(AttributeType::String, 'required' => false), 'sent' => AttributeType::Bool, 'recipientLists' => Attributetype::Mixed);
     return array_merge($defaults, $attributes);
 }
开发者ID:jackmcgreevy,项目名称:fast,代码行数:9,代码来源:SproutEmail_EntryModel.php

示例11: defineAttributes

 /**
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('appId' => AttributeType::Number, 'title' => AttributeType::Name, 'body' => AttributeType::String, 'command' => AttributeType::String, 'schedule' => array(AttributeType::DateTime, 'default' => DateTimeHelper::currentUTCDateTime())));
 }
开发者ID:webremote,项目名称:pushnotifications,代码行数:7,代码来源:PushNotifications_NotificationModel.php

示例12: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'ip' => AttributeType::String, 'formId' => AttributeType::Number, 'title' => AttributeType::String, 'data' => AttributeType::Mixed));
 }
开发者ID:plainlanguage,项目名称:Craft-PlainForm,代码行数:4,代码来源:PlainForm_EntryModel.php

示例13: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => array(AttributeType::Number), 'elementId' => array(AttributeType::Number), 'elementType' => array(AttributeType::String), 'userId' => array(AttributeType::Number), 'structureId' => array(AttributeType::Number), 'status' => array(AttributeType::Enum, 'values' => array(Comments_CommentModel::APPROVED, Comments_CommentModel::PENDING, Comments_CommentModel::SPAM, Comments_CommentModel::TRASHED)), 'name' => array(AttributeType::String), 'email' => array(AttributeType::Email), 'url' => array(AttributeType::Url), 'ipAddress' => array(AttributeType::String), 'userAgent' => array(AttributeType::String), 'comment' => array(AttributeType::String), 'rating' => array(AttributeType::String), 'parentId' => AttributeType::Number));
 }
开发者ID:Uxiliary,项目名称:Comments,代码行数:4,代码来源:Comments_CommentModel.php

示例14: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('setId' => AttributeType::Number, 'name' => AttributeType::String));
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:8,代码来源:TagModel.php

示例15: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => craft()->language), 'elementId' => array(AttributeType::Number, 'default' => 0), 'metaType' => array(AttributeType::Enum, 'values' => "default,template", 'default' => 'template'), 'metaPath' => array(AttributeType::String, 'default' => ''), 'seoTitle' => array(AttributeType::String, 'default' => ''), 'seoDescription' => array(AttributeType::String, 'default' => ''), 'seoKeywords' => array(AttributeType::String, 'default' => ''), 'twitterCardType' => array(AttributeType::String, 'default' => ''), 'openGraphType' => array(AttributeType::String, 'default' => ''), 'robots' => array(AttributeType::String, 'default' => ''), 'seoImageId' => array(AttributeType::Number, 'default' => 0)));
 }
开发者ID:transomdesign,项目名称:transom-craft-starter,代码行数:8,代码来源:Seomatic_MetaModel.php


注:本文中的BaseElementModel::defineAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。