本文整理汇总了PHP中PersonPeer::getForSelectParent方法的典型用法代码示例。如果您正苦于以下问题:PHP PersonPeer::getForSelectParent方法的具体用法?PHP PersonPeer::getForSelectParent怎么用?PHP PersonPeer::getForSelectParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PersonPeer
的用法示例。
在下文中一共展示了PersonPeer::getForSelectParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
public function configure()
{
unset($this['id'], $this['date_added'], $this['date_updated']);
$affiliations = AffiliationPeer::getForSelectParent();
$companies = CompanyPeer::getForSelectParent();
$persons = PersonPeer::getForSelectParent();
# Fields
$this->widgetSchema['co_donor_id'] = new sfWidgetFormInput(array(), array('class' => 'text narrow'));
$this->widgetSchema['affiliation_id'] = new sfWidgetFormChoice(array('choices' => $affiliations));
$this->widgetSchema['block_mailings'] = new sfWidgetFormInputCheckbox(array(), array('value' => 1));
$this->widgetSchema['prospect_comment'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
$this->widgetSchema['salutation'] = new sfWidgetFormInput(array(), array('class' => 'text'));
$this->widgetSchema['company_id'] = new sfWidgetFormChoice(array('choices' => $companies));
$this->widgetSchema['position'] = new sfWidgetFormInput(array(), array('class' => 'text'));
$this->widgetSchema['donor_potential'] = new sfWidgetFormInput(array(), array('class' => 'text'));
$this->widgetSchema['person_id'] = new sfWidgetFormChoice(array('choices' => $persons));
$this->widgetSchema->setLabels(array('co_donor_id' => 'Co Donor Id'));
$this->widgetSchema->setLabels(array('affiliation_id' => 'Affiliation Id'));
$this->widgetSchema->setLabels(array('block_mailings' => 'Block mailings'));
$this->widgetSchema->setLabels(array('prospect_comment' => 'Prospect comment'));
$this->widgetSchema->setLabels(array('salutation' => 'Salutation'));
$this->widgetSchema->setLabels(array('company_id' => 'Company'));
$this->widgetSchema->setLabels(array('position' => 'Position'));
$this->widgetSchema->setLabels(array('donor_potential' => 'Donor potential'));
$this->widgetSchema->setLabels(array('person_id' => 'Person'));
$this->validatorSchema['co_donor_id'] = new sfValidatorInteger(array('required' => false), array('invalid' => 'Co donor id must be in number format !'));
$this->validatorSchema['affiliation_id'] = new sfValidatorInteger(array('required' => false));
$this->validatorSchema['block_mailings'] = new sfValidatorInteger(array('required' => false));
$this->validatorSchema['prospect_comment'] = new sfValidatorString(array('required' => false));
$this->validatorSchema['salutation'] = new sfValidatorString(array('required' => false));
$this->validatorSchema['company_id'] = new sfValidatorInteger(array('required' => false));
$this->validatorSchema['position'] = new sfValidatorString(array('required' => false));
$this->validatorSchema['donor_potential'] = new sfValidatorInteger(array('required' => false), array('invalid' => 'Donor porential must be in number format !'));
$this->validatorSchema['person_id'] = new sfValidatorInteger(array('required' => false));
$this->widgetSchema->setNameFormat('donor[%s]');
}