本文整理匯總了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();
}
示例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');
}
示例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');
}
示例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();
}
示例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();
}
示例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');
}
示例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');
}
示例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');
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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');
}
示例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');
}
示例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();
}