本文整理汇总了PHP中UserForm::configure_specific方法的典型用法代码示例。如果您正苦于以下问题:PHP UserForm::configure_specific方法的具体用法?PHP UserForm::configure_specific怎么用?PHP UserForm::configure_specific使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserForm
的用法示例。
在下文中一共展示了UserForm::configure_specific方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure_specific
public function configure_specific()
{
parent::configure_specific();
unset($this['created_at'], $this['updated_at'], $this['login'], $this['nt_password'], $this['lm_password'], $this['crypt_password'], $this['unix_password'], $this['email_local_part'], $this['gid'], $this['uid'], $this['domainname_id']);
if (!$this->isNew()) {
// Embeding only when editing
$user = $this->getObject();
// EMBED SAMBA FORM
foreach ($user->getSambaAccounts() as $samba_account) {
$this->embedForm('samba_account-' . $samba_account->getId(), new EmbeddedSambaAccountForm($samba_account));
// form
}
$new_sambaaccount_form = new EmbeddedSambaAccountForm();
$new_sambaaccount_form->setDefault('user_id', $user->getId());
$this->embedForm('new_samba_account', $new_sambaaccount_form);
// EMBED FTP FORM
foreach ($user->getFtpAccounts() as $ftp_account) {
$this->embedForm('ftp_account-' . $ftp_account->getId(), new EmbeddedFtpAccountForm($ftp_account));
// form
}
if (count($user->getFtpAccounts()) == 0) {
$new_ftpaccount_form = new EmbeddedFtpAccountForm();
$new_ftpaccount_form->setDefault('user_id', $user->getId());
$this->embedForm('new_ftp_account', $new_ftpaccount_form);
}
// EMBED UNIX FORM
foreach ($user->getUnixAccounts() as $unix_account) {
$this->embedForm('unix_account-' . $unix_account->getId(), new EmbeddedUnixAccountForm($unix_account));
// form
}
$new_unixaccount_form = new EmbeddedUnixAccountForm();
$new_unixaccount_form->setDefault('user_id', $user->getId());
$this->embedForm('new_unix_account', $new_unixaccount_form);
}
}
示例2: configure_specific
public function configure_specific()
{
parent::configure_specific();
unset($this['name'], $this['fathers_name'], $this['grand_fathers_name'], $this['created_at'], $this['updated_at'], $this['expires_at'], $this['login'], $this['nt_password'], $this['lm_password'], $this['crypt_password'], $this['unix_password'], $this['email_local_part'], $this['email_quota'], $this['domainname_id'], $this['gid'], $this['uid'], $this['status']);
}