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


PHP ClassMetadataBuilder::addId方法代碼示例

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


在下文中一共展示了ClassMetadataBuilder::addId方法的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('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

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

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

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

示例6: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('permissions')->setCustomRepositoryClass('Mautic\\UserBundle\\Entity\\PermissionRepository')->addUniqueConstraint(['bundle', 'name', 'role_id'], 'unique_perm');
     $builder->addId();
     $builder->createField('bundle', 'string')->length(50)->build();
     $builder->createField('name', 'string')->length(50)->build();
     $builder->createManyToOne('role', 'Role')->inversedBy('permissions')->addJoinColumn('role_id', 'id', false, false, 'CASCADE')->build();
     $builder->addField('bitwise', 'integer');
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:Permission.php

示例7: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_notes')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\LeadNoteRepository');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'notes');
     $builder->addField('text', 'text');
     $builder->createField('type', 'string')->length(50)->nullable()->build();
     $builder->createField('dateTime', 'datetime')->columnName('date_time')->nullable()->build();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:13,代碼來源:LeadNote.php

示例8: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_frequencyrules')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\FrequencyRuleRepository')->addIndex(['channel'], 'channel_frequency');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'frequencyRules');
     $builder->addDateAdded();
     $builder->addNamedField('frequencyNumber', 'smallint', 'frequency_number');
     $builder->createField('frequencyTime', 'string')->columnName('frequency_time')->length(25)->build();
     $builder->createField('channel', 'string')->build();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:14,代碼來源:FrequencyRule.php

示例9: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('page_redirects')->setCustomRepositoryClass('Mautic\\PageBundle\\Entity\\RedirectRepository');
     $builder->addId();
     $builder->createField('redirectId', 'string')->columnName('redirect_id')->length(25)->build();
     $builder->addField('url', 'text');
     $builder->addField('hits', 'integer');
     $builder->createField('uniqueHits', 'integer')->columnName('unique_hits')->build();
     $builder->createOneToMany('trackables', 'Trackable')->mappedBy('redirect')->fetchExtraLazy()->build();
 }
開發者ID:Yame-,項目名稱:mautic,代碼行數:14,代碼來源:Redirect.php

示例10: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('page_redirects')->setCustomRepositoryClass('Mautic\\PageBundle\\Entity\\RedirectRepository');
     $builder->addId();
     $builder->createField('redirectId', 'string')->columnName('redirect_id')->length(25)->build();
     $builder->addField('url', 'text');
     $builder->addField('hits', 'integer');
     $builder->createField('uniqueHits', 'integer')->columnName('unique_hits')->build();
     $builder->createManyToOne('email', 'Mautic\\EmailBundle\\Entity\\Email')->addJoinColumn('email_id', 'id', true, false, 'SET NULL')->build();
 }
開發者ID:smotalima,項目名稱:mautic,代碼行數:14,代碼來源:Redirect.php

示例11: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_stages_change_log')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\StagesChangeLogRepository');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'stageChangeLog');
     $builder->createField('eventName', 'string')->columnName('event_name')->build();
     $builder->createField('actionName', 'string')->columnName('action_name')->build();
     $builder->createManyToOne('stage', 'Mautic\\StageBundle\\Entity\\Stage')->inversedBy('stageChangeLog')->addJoinColumn('stage_id', 'id', true, false, 'CASCADE')->build();
     $builder->addDateAdded();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:14,代碼來源:StagesChangeLog.php

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

示例13: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_companies_change_log')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\CompanyChangeLogRepository')->addIndex(['date_added'], 'company_date_added');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'companyChangeLog');
     $builder->createField('type', 'text')->length(50)->build();
     $builder->createField('eventName', 'string')->columnName('event_name')->build();
     $builder->createField('actionName', 'string')->columnName('action_name')->build();
     $builder->createField('company', 'integer')->columnName('company_id')->build();
     $builder->addDateAdded();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:15,代碼來源:CompanyChangeLog.php

示例14: loadMetadata

 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('webhook_logs')->setCustomRepositoryClass('Mautic\\WebhookBundle\\Entity\\LogRepository');
     // id columns
     $builder->addId();
     // M:1 for webhook
     $builder->createManyToOne('webhook', 'Webhook')->inversedBy('logs')->addJoinColumn('webhook_id', 'id', false, false, 'CASCADE')->build();
     // status code
     $builder->createField('statusCode', 'string')->columnName('status_code')->length(50)->build();
     // date added
     $builder->createField('dateAdded', 'datetime')->columnName('date_added')->nullable()->build();
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:16,代碼來源:Log.php

示例15: 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');
     $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:Jandersolutions,項目名稱:mautic,代碼行數:16,代碼來源:PointsChangeLog.php


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