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


PHP ClassMetadataBuilder::setTable方法代碼示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例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('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

示例7: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('monitor_post_count')->setCustomRepositoryClass('MauticPlugin\\MauticSocialBundle\\Entity\\PostCountRepository');
     $builder->addId();
     $builder->createManyToOne('monitor', 'Monitoring')->addJoinColumn('monitor_id', 'id', true, false, 'CASCADE')->build();
     $builder->addNamedField('postDate', 'date', 'post_date');
     $builder->addNamedField('postCount', 'integer', 'post_count');
 }
開發者ID:Yame-,項目名稱:mautic,代碼行數:12,代碼來源:PostCount.php

示例8: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('email_copies')->setCustomRepositoryClass('Mautic\\EmailBundle\\Entity\\CopyRepository');
     $builder->createField('id', 'string')->isPrimaryKey()->length(32)->build();
     $builder->createField('dateCreated', 'datetime')->columnName('date_created')->build();
     $builder->addNullableField('body', 'text');
     $builder->addNullableField('subject', 'text');
 }
開發者ID:Yame-,項目名稱:mautic,代碼行數:12,代碼來源:Copy.php

示例9: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('categories')->setCustomRepositoryClass('Mautic\\CategoryBundle\\Entity\\CategoryRepository')->addIndex(['alias'], 'category_alias_search');
     $builder->addIdColumns('title');
     $builder->addField('alias', 'string');
     $builder->createField('color', 'string')->nullable()->length(7)->build();
     $builder->createField('bundle', 'string')->length(50)->build();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:12,代碼來源:Category.php

示例10: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('point_lead_action_log')->setCustomRepositoryClass('Mautic\\PointBundle\\Entity\\LeadPointLogRepository');
     $builder->createManyToOne('point', 'Point')->isPrimaryKey()->addJoinColumn('point_id', 'id', true, false, 'CASCADE')->inversedBy('log')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->addIpAddress(true);
     $builder->createField('dateFired', 'datetime')->columnName('date_fired')->build();
 }
開發者ID:Jandersolutions,項目名稱:mautic,代碼行數:12,代碼來源:LeadPointLog.php

示例11: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('email_stats_devices')->setCustomRepositoryClass('Mautic\\EmailBundle\\Entity\\StatDeviceRepository')->addIndex(['date_opened'], 'date_opened_search');
     $builder->addId();
     $builder->createManyToOne('device', 'Mautic\\LeadBundle\\Entity\\LeadDevice')->addJoinColumn('device_id', 'id', true, false, 'CASCADE')->build();
     $builder->createManyToOne('stat', 'Stat')->addJoinColumn('stat_id', 'id', true, false, 'CASCADE')->build();
     $builder->addIpAddress(true);
     $builder->createField('dateOpened', 'datetime')->columnName('date_opened')->build();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:StatDevice.php

示例12: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('roles')->setCustomRepositoryClass('Mautic\\UserBundle\\Entity\\RoleRepository');
     $builder->addIdColumns();
     $builder->createField('isAdmin', 'boolean')->columnName('is_admin')->build();
     $builder->createOneToMany('permissions', 'Permission')->orphanRemoval()->mappedBy('role')->cascadePersist()->cascadeRemove()->fetchExtraLazy()->build();
     $builder->createField('rawPermissions', 'array')->columnName('readable_permissions')->build();
     $builder->createOneToMany('users', 'User')->mappedBy('role')->fetchExtraLazy()->build();
 }
開發者ID:spdaly,項目名稱:mautic,代碼行數:13,代碼來源:Role.php

示例13: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('channel_url_trackables')->setCustomRepositoryClass('Mautic\\PageBundle\\Entity\\TrackableRepository')->addIndex(['channel', 'channel_id'], 'channel_url_trackable_search');
     $builder->createManyToOne('redirect', 'Mautic\\PageBundle\\Entity\\Redirect')->addJoinColumn('redirect_id', 'id', true, false, 'CASCADE')->cascadePersist()->inversedBy('trackables')->isPrimaryKey()->build();
     $builder->createField('channelId', 'integer')->columnName('channel_id')->isPrimaryKey()->build();
     $builder->addField('channel', 'string');
     $builder->addField('hits', 'integer');
     $builder->addNamedField('uniqueHits', 'integer', 'unique_hits');
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:Trackable.php

示例14: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('focus_stats')->setCustomRepositoryClass('MauticPlugin\\MauticFocusBundle\\Entity\\StatRepository')->addIndex(['type'], 'focus_type')->addIndex(['type', 'type_id'], 'focus_type_id')->addIndex(['date_added'], 'focus_date_added');
     $builder->addId();
     $builder->createManyToOne('focus', 'Focus')->addJoinColumn('focus_id', 'id', false, false, 'CASCADE')->build();
     $builder->addField('type', 'string');
     $builder->addNamedField('typeId', 'integer', 'type_id', true);
     $builder->addNamedField('dateAdded', 'datetime', 'date_added');
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:Stat.php

示例15: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('stages')->setCustomRepositoryClass('Mautic\\StageBundle\\Entity\\StageRepository');
     $builder->addIdColumns();
     $builder->createField('weight', 'integer')->build();
     $builder->addPublishDates();
     $builder->createOneToMany('log', 'LeadStageLog')->mappedBy('stage')->cascadePersist()->cascadeRemove()->fetchExtraLazy()->build();
     $builder->addCategory();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:Stage.php


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