• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mapping\ClassMetadataBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder的典型用法代码示例。如果您正苦于以下问题:PHP ClassMetadataBuilder类的具体用法?PHP ClassMetadataBuilder怎么用?PHP ClassMetadataBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: loadMetadata

 /**
  * @param ClassMetadata $metadata
  */
 public static function loadMetadata(ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_tags')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\TagRepository')->addIndex(array('tag'), 'lead_tag_search');
     $builder->addId();
     $builder->addField('tag', 'string');
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:10,代码来源:Tag.php


示例2: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('oauth1_nonces')->setCustomRepositoryClass('Mautic\\ApiBundle\\Entity\\oAuth1\\NonceRepository');
     $builder->createField('nonce', 'string')->isPrimaryKey()->build();
     $builder->addField('timestamp', 'string');
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:10,代码来源:Nonce.php


示例3: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('companies')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\CompanyRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('owner', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('owner_id', 'id', true, false, 'SET NULL')->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:10,代码来源:Company.php


示例4: addVariantMetadata

 /**
  * @param ClassMetadata $builder
  * @param               $entityClass
  */
 protected static function addVariantMetadata(ClassMetadataBuilder $builder, $entityClass)
 {
     $builder->createManyToOne('variantParent', $entityClass)->inversedBy('variantChildren')->addJoinColumn('variant_parent_id', 'id', true, false, 'CASCADE')->build();
     $builder->createOneToMany('variantChildren', $entityClass)->setIndexBy('id')->setOrderBy(['isPublished' => 'DESC'])->mappedBy('variantParent')->build();
     $builder->createField('variantSettings', 'array')->columnName('variant_settings')->nullable()->build();
     $builder->createField('variantStartDate', 'datetime')->columnName('variant_start_date')->nullable()->build();
 }
开发者ID:Yame-,项目名称:mautic,代码行数:11,代码来源:VariantEntityTrait.php


示例5: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('ip_addresses')->setCustomRepositoryClass('Mautic\\CoreBundle\\Entity\\IpAddressRepository')->addIndex(['ip_address'], 'ip_search');
     $builder->addId();
     $builder->createField('ipAddress', 'string')->columnName('ip_address')->length(45)->build();
     $builder->createField('ipDetails', 'array')->columnName('ip_details')->nullable()->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:11,代码来源:IpAddress.php


示例6: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('push_ids')->setCustomRepositoryClass('Mautic\\NotificationBundle\\Entity\\PushIDRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createField('pushID', 'string')->columnName('push_id')->nullable(false)->build();
     $builder->createManyToOne('lead', 'Mautic\\LeadBundle\\Entity\\Lead')->addJoinColumn('lead_id', 'id', true, false, 'SET NULL')->inversedBy('pushIds')->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:11,代码来源:PushID.php


示例7: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('monitoring_leads')->setCustomRepositoryClass('MauticPlugin\\MauticSocialBundle\\Entity\\LeadRepository');
     $builder->createManyToOne('monitor', 'Monitoring')->isPrimaryKey()->addJoinColumn('monitor_id', 'id', false, false, 'CASCADE')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->addNamedField('dateAdded', 'datetime', 'date_added');
 }
开发者ID:Yame-,项目名称:mautic,代码行数:11,代码来源:Lead.php


示例8: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('point_triggers')->setCustomRepositoryClass('Mautic\\PointBundle\\Entity\\TriggerRepository');
     $builder->addIdColumns();
     $builder->addPublishDates();
     $builder->addField('points', 'integer');
     $builder->createField('color', 'string')->length(7)->build();
     $builder->createField('triggerExistingLeads', 'boolean')->columnName('trigger_existing_leads')->build();
     $builder->addCategory();
     $builder->createOneToMany('events', 'TriggerEvent')->setIndexBy('id')->setOrderBy(array('order' => 'ASC'))->mappedBy('trigger')->cascadeAll()->fetchExtraLazy()->build();
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:15,代码来源:Trigger.php


示例9: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('points')->setCustomRepositoryClass('Mautic\\PointBundle\\Entity\\PointRepository')->addIndex(array('type'), 'point_type_search');
     $builder->addIdColumns();
     $builder->createField('type', 'string')->length(50)->build();
     $builder->addPublishDates();
     $builder->addField('delta', 'integer');
     $builder->addField('properties', 'array');
     $builder->createOneToMany('log', 'LeadPointLog')->mappedBy('point')->cascadePersist()->cascadeRemove()->fetchExtraLazy()->build();
     $builder->addCategory();
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:15,代码来源:Point.php


示例10: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('widgets')->setCustomRepositoryClass('Mautic\\DashboardBundle\\Entity\\WidgetRepository');
     $builder->addIdColumns('name', false);
     $builder->addField('type', 'string');
     $builder->addField('width', 'integer');
     $builder->addField('height', 'integer');
     $builder->createField('cacheTimeout', 'integer')->columnName('cache_timeout')->nullable()->build();
     $builder->createField('ordering', 'integer')->nullable()->build();
     $builder->createField('params', 'array')->nullable()->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:15,代码来源:Widget.php


示例11: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('monitoring')->setCustomRepositoryClass('MauticPlugin\\MauticSocialBundle\\Entity\\MonitoringRepository')->addLifecycleEvent('cleanMonitorData', 'preUpdate')->addLifecycleEvent('cleanMonitorData', 'prePersist');
     $builder->addCategory();
     $builder->addIdColumns('title');
     $builder->addNullableField('lists', 'array');
     $builder->addNamedField('networkType', 'string', 'network_type', true);
     $builder->addField('revision', 'integer');
     $builder->addNullableField('stats', 'array');
     $builder->addNullableField('properties', 'array');
     $builder->addPublishDates();
 }
开发者ID:Yame-,项目名称:mautic,代码行数:16,代码来源:Monitoring.php


示例12: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('notifications')->setCustomRepositoryClass('Mautic\\CoreBundle\\Entity\\NotificationRepository')->addIndex(['is_read'], 'notification_read_status')->addIndex(['type'], 'notification_type')->addIndex(['is_read', 'user_id'], 'notification_user_read_status');
     $builder->addId();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', false, false, 'CASCADE')->build();
     $builder->createField('type', 'string')->nullable()->length(25)->build();
     $builder->createField('header', 'string')->nullable()->build();
     $builder->addField('message', 'text');
     $builder->addDateAdded();
     $builder->createField('iconClass', 'string')->columnName('icon_class')->nullable()->build();
     $builder->createField('isRead', 'boolean')->columnName('is_read')->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:16,代码来源:Notification.php


示例13: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_points_change_log')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\PointsChangeLogRepository')->addIndex(['date_added'], 'point_date_added');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'pointsChangeLog');
     $builder->addIpAddress();
     $builder->createField('type', 'text')->length(50)->build();
     $builder->createField('eventName', 'string')->columnName('event_name')->build();
     $builder->createField('actionName', 'string')->columnName('action_name')->build();
     $builder->addField('delta', 'integer');
     $builder->addDateAdded();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:16,代码来源:PointsChangeLog.php


示例14: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('form_submissions')->setCustomRepositoryClass('Mautic\\FormBundle\\Entity\\SubmissionRepository')->addIndex(['tracking_id'], 'form_submission_tracking_search')->addIndex(['date_submitted'], 'form_date_submitted');
     $builder->addId();
     $builder->createManyToOne('form', 'Form')->inversedBy('submissions')->addJoinColumn('form_id', 'id', false, false, 'CASCADE')->build();
     $builder->addIpAddress();
     $builder->addLead(true, 'SET NULL');
     $builder->createField('trackingId', 'string')->columnName('tracking_id')->nullable()->build();
     $builder->createField('dateSubmitted', 'datetime')->columnName('date_submitted')->build();
     $builder->addField('referer', 'text');
     $builder->createManyToOne('page', 'Mautic\\PageBundle\\Entity\\Page')->addJoinColumn('page_id', 'id', true, false, 'SET NULL')->fetchExtraLazy()->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:16,代码来源:Submission.php


示例15: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setMappedSuperClass();
     $builder->createField('isPublished', 'boolean')->columnName('is_published')->build();
     $builder->addDateAdded(true);
     $builder->createField('createdBy', 'integer')->columnName('created_by')->nullable()->build();
     $builder->createField('createdByUser', 'string')->columnName('created_by_user')->nullable()->build();
     $builder->createField('dateModified', 'datetime')->columnName('date_modified')->nullable()->build();
     $builder->createField('modifiedBy', 'integer')->columnName('modified_by')->nullable()->build();
     $builder->createField('modifiedByUser', 'string')->columnName('modified_by_user')->nullable()->build();
     $builder->createField('checkedOut', 'datetime')->columnName('checked_out')->nullable()->build();
     $builder->createField('checkedOutBy', 'integer')->columnName('checked_out_by')->nullable()->build();
     $builder->createField('checkedOutByUser', 'string')->columnName('checked_out_by_user')->nullable()->build();
 }
开发者ID:Yame-,项目名称:mautic,代码行数:18,代码来源:FormEntity.php


示例16: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('oauth1_request_tokens')->addIndex(array('token'), 'oauth1_request_token_search');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('consumer', 'Consumer')->addJoinColumn('consumer_id', 'id', false, false, 'CASCADE')->build();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', true, false, 'CASCADE')->build();
     $builder->addField('token', 'string');
     $builder->addField('secret', 'string');
     $builder->createField('expiresAt', 'bigint')->columnName('expires_at')->build();
     $builder->addField('verifier', 'string');
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:15,代码来源:RequestToken.php


示例17: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('plugin_integration_settings')->setCustomRepositoryClass('Mautic\\PluginBundle\\Entity\\IntegrationRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('plugin', 'Plugin')->inversedBy('integrations')->addJoinColumn('plugin_id', 'id', true, false, 'CASCADE')->build();
     $builder->addField('name', 'string');
     $builder->createField('isPublished', 'boolean')->columnName('is_published')->build();
     $builder->createField('supportedFeatures', 'array')->columnName('supported_features')->nullable()->build();
     $builder->createField('apiKeys', 'array')->columnName('api_keys')->build();
     $builder->createField('featureSettings', 'array')->columnName('feature_settings')->nullable()->build();
 }
开发者ID:Jandersolutions,项目名称:mautic,代码行数:15,代码来源:Integration.php


示例18: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('oauth2_authcodes');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('client', 'Client')->addJoinColumn('client_id', 'id', false, false, 'CASCADE')->build();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', false, false, 'CASCADE')->build();
     $builder->createField('token', 'string')->unique()->build();
     $builder->createField('expiresAt', 'bigint')->columnName('expires_at')->nullable()->build();
     $builder->createField('scope', 'string')->nullable()->build();
     $builder->createField('redirectUri', 'text')->columnName('redirect_uri')->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:15,代码来源:AuthCode.php


示例19: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_donotcontact')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\DoNotContactRepository')->addIndex(['reason'], 'dnc_reason_search');
     $builder->addId();
     $builder->addLead(true, 'CASCADE', false, 'doNotContact');
     $builder->addDateAdded();
     $builder->createField('reason', 'smallint')->build();
     $builder->createField('channel', 'string')->build();
     $builder->addNamedField('channelId', 'integer', 'channel_id', true);
     $builder->createField('comments', 'text')->nullable()->build();
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:15,代码来源:DoNotContact.php


示例20: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('reports')->setCustomRepositoryClass('Mautic\\ReportBundle\\Entity\\ReportRepository');
     $builder->addIdColumns();
     $builder->addField('system', 'boolean');
     $builder->addField('source', 'string');
     $builder->createField('columns', 'array')->nullable()->build();
     $builder->createField('filters', 'array')->nullable()->build();
     $builder->createField('tableOrder', 'array')->columnName('table_order')->nullable()->build();
     $builder->createField('graphs', 'array')->nullable()->build();
 }
开发者ID:Yame-,项目名称:mautic,代码行数:15,代码来源:Report.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Factory\MauticFactory类代码示例发布时间:2022-05-23
下一篇:
PHP Driver\ApiMetadataDriver类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap