本文整理汇总了PHP中DataExtension::setOwner方法的典型用法代码示例。如果您正苦于以下问题:PHP DataExtension::setOwner方法的具体用法?PHP DataExtension::setOwner怎么用?PHP DataExtension::setOwner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataExtension
的用法示例。
在下文中一共展示了DataExtension::setOwner方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setOwner
public function setOwner($owner, $ownerBaseClass = null)
{
if (!$this->hasSetRelationForHidingFromFieldLists) {
static::$connected_relations[] = get_class($owner);
}
return parent::setOwner($owner, $ownerBaseClass);
}
示例2: setOwner
public function setOwner($owner, $ownerBaseClass = null)
{
parent::setOwner($owner, $ownerBaseClass);
if ($owner) {
Config::inst()->remove(get_class($owner), 'searchable_fields');
Config::inst()->update(get_class($owner), 'searchable_fields', array('FirstName' => 'PartialMatchFilter', 'Surname' => 'PartialMatchFilter', 'Email' => 'PartialMatchFilter'));
}
}
示例3: setOwner
public function setOwner($owner, $ownerBaseClass = null)
{
parent::setOwner($owner, $ownerBaseClass);
// setting translatable fields by inspecting owner - this should really be done in the constructor
if ($this->owner && $this->translatableFields === null) {
$this->translatableFields = array_merge(array_keys($this->owner->db()), array_keys($this->owner->hasMany()), array_keys($this->owner->manyMany()));
foreach (array_keys($this->owner->hasOne()) as $fieldname) {
$this->translatableFields[] = $fieldname . 'ID';
}
}
}
示例4: setOwner
function setOwner($owner, $ownerBaseClass = null)
{
parent::setOwner($owner, $ownerBaseClass);
// setting translatable fields by inspecting owner - this should really be done in the constructor
if ($this->owner && $this->translatableFields === null) {
$this->translatableFields = array_merge(array_keys($this->owner->inheritedDatabaseFields()), array_keys($this->owner->has_many()), array_keys($this->owner->many_many()));
}
}