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


PHP BaseModel::defineAttributes方法代码示例

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


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

示例1: defineAttributes

 /**
  * Defines this model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('redirectSrcUrl' => array(AttributeType::String, 'default' => ''), 'redirectSrcUrlParsed' => array(AttributeType::String, 'default' => ''), 'redirectMatchType' => array(AttributeType::String, 'default' => 'match'), 'redirectDestUrl' => array(AttributeType::String, 'default' => ''), 'redirectHttpCode' => array(AttributeType::Number, 'default' => 301), 'hitCount' => array(AttributeType::Number, 'default' => 0), 'hitLastTime' => array(AttributeType::DateTime, 'default' => DateTimeHelper::currentTimeForDb()), 'locale' => array(AttributeType::String, 'default' => ''), 'associatedElementId' => array(AttributeType::Number, 'default' => 0)));
 }
开发者ID:nystudio107,项目名称:retour,代码行数:9,代码来源:Retour_RedirectsModel.php

示例2: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => ''), 'siteCreatorType' => array(AttributeType::String, 'default' => 'Organization'), 'siteCreatorSubType' => array(AttributeType::String, 'default' => 'Corporation'), 'siteCreatorSpecificType' => array(AttributeType::String, 'default' => ''), 'genericCreatorName' => array(AttributeType::String, 'default' => ''), 'genericCreatorAlternateName' => array(AttributeType::String, 'default' => ''), 'genericCreatorDescription' => array(AttributeType::String, 'default' => ''), 'genericCreatorUrl' => array(AttributeType::String, 'default' => ''), 'genericCreatorImageId' => array(AttributeType::String, 'default' => ''), 'genericCreatorTelephone' => array(AttributeType::String, 'default' => ''), 'genericCreatorEmail' => array(AttributeType::String, 'default' => ''), 'genericCreatorStreetAddress' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressLocality' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressRegion' => array(AttributeType::String, 'default' => ''), 'genericCreatorPostalCode' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressCountry' => array(AttributeType::String, 'default' => ''), 'genericCreatorGeoLatitude' => array(AttributeType::String, 'default' => ''), 'genericCreatorGeoLongitude' => array(AttributeType::String, 'default' => ''), 'organizationCreatorDuns' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFounder' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFoundingDate' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFoundingLocation' => array(AttributeType::String, 'default' => ''), 'personCreatorGender' => array(AttributeType::String, 'default' => ''), 'personCreatorBirthPlace' => array(AttributeType::String, 'default' => ''), 'corporationCreatorTickerSymbol' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:nystudio107,项目名称:seomatic,代码行数:8,代码来源:Seomatic_CreatorModel.php

示例3: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => craft()->language), 'siteSeoName' => array(AttributeType::String, 'default' => craft()->getSiteName()), 'siteSeoTitle' => array(AttributeType::String, 'default' => 'This is the default global title of the site pages.'), 'siteSeoDescription' => array(AttributeType::String, 'default' => 'This is the default global natural language description of the content on the site pages.'), 'siteSeoKeywords' => array(AttributeType::String, 'default' => 'This is the default global list of comma-separated key words that are relevant to the content on the site pages.'), 'siteSeoImageId' => array(AttributeType::Number, 'default' => null), 'googleSiteVerification' => array(AttributeType::String, 'default' => ''), 'siteOwnerType' => array(AttributeType::String, 'default' => 'corporation'), 'genericOwnerName' => array(AttributeType::String, 'default' => ''), 'genericOwnerAlternateName' => array(AttributeType::String, 'default' => ''), 'genericOwnerDescription' => array(AttributeType::String, 'default' => ''), 'genericOwnerUrl' => array(AttributeType::String, 'default' => ''), 'genericOwnerImageId' => array(AttributeType::String, 'default' => ''), 'genericOwnerTelephone' => array(AttributeType::String, 'default' => ''), 'genericOwnerEmail' => array(AttributeType::String, 'default' => ''), 'genericOwnerStreetAddress' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressLocality' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressRegion' => array(AttributeType::String, 'default' => ''), 'genericOwnerPostalCode' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressCountry' => array(AttributeType::String, 'default' => ''), 'genericOwnerGeoLatitude' => array(AttributeType::String, 'default' => ''), 'genericOwnerGeoLongitude' => array(AttributeType::String, 'default' => ''), 'organizationOwnerDuns' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFounder' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFoundingDate' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFoundingLocation' => array(AttributeType::String, 'default' => ''), 'corporationOwnerTickerSymbol' => array(AttributeType::String, 'default' => ''), 'restaurantOwnerServesCuisine' => array(AttributeType::String, 'default' => ''), 'personOwnerGender' => array(AttributeType::String, 'default' => ''), 'personOwnerBirthPlace' => array(AttributeType::String, 'default' => ''), 'twitterHandle' => array(AttributeType::String, 'default' => ''), 'facebookHandle' => array(AttributeType::String, 'default' => ''), 'facebookProfileId' => array(AttributeType::String, 'default' => ''), 'linkedInHandle' => array(AttributeType::String, 'default' => ''), 'googlePlusHandle' => array(AttributeType::String, 'default' => ''), 'youtubeHandle' => array(AttributeType::String, 'default' => ''), 'instagramHandle' => array(AttributeType::String, 'default' => ''), 'pinterestHandle' => array(AttributeType::String, 'default' => ''), 'siteCreatorType' => array(AttributeType::String, 'default' => 'corporation'), 'genericCreatorName' => array(AttributeType::String, 'default' => ''), 'genericCreatorAlternateName' => array(AttributeType::String, 'default' => ''), 'genericCreatorDescription' => array(AttributeType::String, 'default' => ''), 'genericCreatorUrl' => array(AttributeType::String, 'default' => ''), 'genericCreatorImageId' => array(AttributeType::String, 'default' => ''), 'genericCreatorTelephone' => array(AttributeType::String, 'default' => ''), 'genericCreatorEmail' => array(AttributeType::String, 'default' => ''), 'genericCreatorStreetAddress' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressLocality' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressRegion' => array(AttributeType::String, 'default' => ''), 'genericCreatorPostalCode' => array(AttributeType::String, 'default' => ''), 'genericCreatorAddressCountry' => array(AttributeType::String, 'default' => ''), 'genericCreatorGeoLatitude' => array(AttributeType::String, 'default' => ''), 'genericCreatorGeoLongitude' => array(AttributeType::String, 'default' => ''), 'organizationCreatorDuns' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFounder' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFoundingDate' => array(AttributeType::String, 'default' => ''), 'organizationCreatorFoundingLocation' => array(AttributeType::String, 'default' => ''), 'corporationCreatorTickerSymbol' => array(AttributeType::String, 'default' => ''), 'restaurantCreatorServesCuisine' => array(AttributeType::String, 'default' => ''), 'personCreatorGender' => array(AttributeType::String, 'default' => ''), 'personCreatorBirthPlace' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:Minds-On-Design-Lab,项目名称:seomatic,代码行数:8,代码来源:Seomatic_SettingsModel.php

示例4: defineAttributes

 /**
  * Defines this model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('number' => array(AttributeType::String, 'default' => ''), 'type' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:nfourtythree,项目名称:craft-vcard,代码行数:9,代码来源:VCard_PhoneNumberModel.php

示例5: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => ''), 'twitterHandle' => array(AttributeType::String, 'default' => ''), 'facebookHandle' => array(AttributeType::String, 'default' => ''), 'facebookProfileId' => array(AttributeType::String, 'default' => ''), 'linkedInHandle' => array(AttributeType::String, 'default' => ''), 'googlePlusHandle' => array(AttributeType::String, 'default' => ''), 'youtubeHandle' => array(AttributeType::String, 'default' => ''), 'instagramHandle' => array(AttributeType::String, 'default' => ''), 'pinterestHandle' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:nystudio107,项目名称:seomatic,代码行数:8,代码来源:Seomatic_SocialModel.php

示例6: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => ''), 'siteSeoName' => array(AttributeType::String, 'default' => ''), 'siteSeoTitle' => array(AttributeType::String, 'default' => ''), 'siteSeoDescription' => array(AttributeType::String, 'default' => ''), 'siteSeoKeywords' => array(AttributeType::String, 'default' => ''), 'siteTwitterCardType' => array(AttributeType::String, 'default' => ''), 'siteOpenGraphType' => array(AttributeType::String, 'default' => ''), 'siteRobots' => array(AttributeType::String, 'default' => ''), 'siteSeoImageId' => array(AttributeType::Number, 'default' => null)));
 }
开发者ID:nystudio107,项目名称:seomatic,代码行数:8,代码来源:Seomatic_SiteMetaModel.php

示例7: defineAttributes

 /**
  * @access protected
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('locale' => array(AttributeType::String, 'default' => ''), 'googleSiteVerification' => array(AttributeType::String, 'default' => ''), 'siteOwnerType' => array(AttributeType::String, 'default' => ''), 'genericOwnerName' => array(AttributeType::String, 'default' => ''), 'genericOwnerAlternateName' => array(AttributeType::String, 'default' => ''), 'genericOwnerDescription' => array(AttributeType::String, 'default' => ''), 'genericOwnerUrl' => array(AttributeType::String, 'default' => ''), 'genericOwnerImageId' => array(AttributeType::String, 'default' => ''), 'genericOwnerTelephone' => array(AttributeType::String, 'default' => ''), 'genericOwnerEmail' => array(AttributeType::String, 'default' => ''), 'genericOwnerStreetAddress' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressLocality' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressRegion' => array(AttributeType::String, 'default' => ''), 'genericOwnerPostalCode' => array(AttributeType::String, 'default' => ''), 'genericOwnerAddressCountry' => array(AttributeType::String, 'default' => ''), 'genericOwnerGeoLatitude' => array(AttributeType::String, 'default' => ''), 'genericOwnerGeoLongitude' => array(AttributeType::String, 'default' => ''), 'organizationOwnerDuns' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFounder' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFoundingDate' => array(AttributeType::String, 'default' => ''), 'organizationOwnerFoundingLocation' => array(AttributeType::String, 'default' => ''), 'personOwnerGender' => array(AttributeType::String, 'default' => ''), 'personOwnerBirthPlace' => array(AttributeType::String, 'default' => ''), 'corporationOwnerTickerSymbol' => array(AttributeType::String, 'default' => ''), 'restaurantOwnerServesCuisine' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:Wiejeben,项目名称:seomatic,代码行数:8,代码来源:Seomatic_IdentityModel.php

示例8: defineAttributes

 /**
  * Define Attributes
  */
 public function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'userId' => AttributeType::Number, 'elementId' => AttributeType::Number));
 }
开发者ID:dukt,项目名称:craft-follow,代码行数:7,代码来源:FollowModel.php

示例9: defineAttributes

 /**
  * Defines this model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('address1' => array(AttributeType::String, 'required' => true, 'default' => null), 'city' => array(AttributeType::String, 'default' => null), 'country' => array(AttributeType::String, 'default' => null), 'country_code' => array(AttributeType::String, 'default' => null), 'first_name' => array(AttributeType::String, 'default' => null), 'last_name' => array(AttributeType::String, 'default' => null), 'phone' => array(AttributeType::String, 'default' => null), 'province' => array(AttributeType::String, 'default' => null), 'province_code' => array(AttributeType::String, 'default' => null), 'zip' => array(AttributeType::String, 'default' => null), 'default' => array(AttributeType::Bool, 'default' => false)));
 }
开发者ID:sjelfull,项目名称:Craft-ShopifyMultipass,代码行数:9,代码来源:ShopifyMultipass_AddressModel.php

示例10: defineAttributes

 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'type' => array(AttributeType::Number, 'required' => true)));
 }
开发者ID:jamiepittock,项目名称:WhereForArt,代码行数:4,代码来源:Shortlist_UserModel.php

示例11: defineAttributes

 /**
  * Defines this model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('email' => array(AttributeType::Email, 'required' => true, 'default' => false), 'created_at' => array(AttributeType::String, 'required' => true, 'default' => date('c')), 'first_name' => array(AttributeType::String, 'default' => null), 'last_name' => array(AttributeType::String, 'default' => null), 'tags' => array(AttributeType::Mixed, 'default' => null), 'remote_ip' => array(AttributeType::String, 'default' => null), 'identifier' => array(AttributeType::String, 'default' => null), 'return_to' => array(AttributeType::String, 'default' => null), 'addresses' => array(AttributeType::Mixed, 'default' => null)));
 }
开发者ID:sjelfull,项目名称:Craft-ShopifyMultipass,代码行数:9,代码来源:ShopifyMultipassModel.php

示例12: defineAttributes

 /**
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('someField' => array(AttributeType::String, 'default' => 'some value')));
 }
开发者ID:nilsenpaul,项目名称:npcloudinary,代码行数:7,代码来源:NpCloudinary_AssetMapperModel.php

示例13: defineAttributes

 /**
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('name' => array(AttributeType::String, 'default' => ''), 'description' => array(AttributeType::String, 'default' => ''), 'skill' => array(AttributeType::String, 'default' => 'intermediate'), 'serves' => array(AttributeType::Number, 'default' => 1), 'ingredients' => array(AttributeType::Mixed, 'default' => ''), 'directions' => array(AttributeType::Mixed, 'default' => ''), 'imageId' => array(AttributeType::Number, 'default' => 0), 'prepTime' => array(AttributeType::Number), 'cookTime' => array(AttributeType::Number), 'totalTime' => array(AttributeType::Number), 'ratings' => array(AttributeType::Mixed), 'servingSize' => array(AttributeType::String, 'default' => ''), 'calories' => array(AttributeType::Number), 'carbohydrateContent' => array(AttributeType::Number), 'cholesterolContent' => array(AttributeType::Number), 'fatContent' => array(AttributeType::Number), 'fiberContent' => array(AttributeType::Number), 'proteinContent' => array(AttributeType::Number), 'saturatedFatContent' => array(AttributeType::Number), 'sodiumContent' => array(AttributeType::Number), 'sugarContent' => array(AttributeType::Number), 'transFatContent' => array(AttributeType::Number), 'unsaturatedFatContent' => array(AttributeType::Number)));
 }
开发者ID:nystudio107,项目名称:recipe,代码行数:7,代码来源:RecipeModel.php

示例14: defineAttributes

 /**
  * Defines this model's attributes.
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('name' => array(AttributeType::String, 'default' => ''), 'extended' => array(AttributeType::String, 'default' => ''), 'street' => array(AttributeType::String, 'default' => ''), 'city' => array(AttributeType::String, 'default' => ''), 'region' => array(AttributeType::String, 'default' => ''), 'zip' => array(AttributeType::String, 'default' => ''), 'country' => array(AttributeType::String, 'default' => ''), 'type' => array(AttributeType::String, 'default' => '')));
 }
开发者ID:nfourtythree,项目名称:craft-vcard,代码行数:9,代码来源:VCard_AddressModel.php

示例15: defineAttributes

 /**
  * @inheritDoc BaseModel::defineAttributes()
  *
  * @return array
  */
 protected function defineAttributes()
 {
     return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'eid' => AttributeType::Number, 'eventid' => AttributeType::Number, 'startDate' => AttributeType::Mixed, 'endDate' => AttributeType::Mixed, 'allDay' => AttributeType::Number, 'repeat' => AttributeType::Number, 'rRule' => AttributeType::String, 'summary' => AttributeType::String, 'isrepeat' => AttributeType::Number, 'enabled' => AttributeType::Number, 'archived' => AttributeType::Bool, 'dateCreated' => AttributeType::Mixed, 'dateUpdated' => AttributeType::Mixed, 'limit' => array('default' => 100, AttributeType::Number), 'order' => array(AttributeType::String, 'default' => 'venti.startDate asc'), 'offset' => array(AttributeType::Number, 'default' => 0), 'sort' => array('default' => 'asc', AttributeType::String), 'locale' => AttributeType::Locale, 'localeEnabled' => array(AttributeType::Bool, 'default' => true), 'relatedTo' => AttributeType::Mixed, 'slug' => AttributeType::String, 'title' => AttributeType::String, 'status' => array(AttributeType::String, 'default' => BaseElementModel::ENABLED), 'uri' => AttributeType::String, 'search' => AttributeType::String, 'kind' => AttributeType::Mixed));
 }
开发者ID:aladrach,项目名称:Bluefoot-Craft-Starter,代码行数:9,代码来源:Venti_CriteriaModel.php


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