當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Mapping\ClassMetadataBuilder類代碼示例

本文整理匯總了PHP中Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder的典型用法代碼示例。如果您正苦於以下問題:PHP ClassMetadataBuilder類的具體用法?PHP ClassMetadataBuilder怎麽用?PHP ClassMetadataBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ClassMetadataBuilder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。