本文整理汇总了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)));
}
示例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' => '')));
}
示例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' => '')));
}
示例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' => '')));
}
示例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' => '')));
}
示例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)));
}
示例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' => '')));
}
示例8: defineAttributes
/**
* Define Attributes
*/
public function defineAttributes()
{
return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'userId' => AttributeType::Number, 'elementId' => AttributeType::Number));
}
示例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)));
}
示例10: defineAttributes
protected function defineAttributes()
{
return array_merge(parent::defineAttributes(), array('id' => AttributeType::Number, 'type' => array(AttributeType::Number, 'required' => true)));
}
示例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)));
}
示例12: defineAttributes
/**
* @return array
*/
protected function defineAttributes()
{
return array_merge(parent::defineAttributes(), array('someField' => array(AttributeType::String, 'default' => 'some value')));
}
示例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)));
}
示例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' => '')));
}
示例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));
}