本文整理汇总了PHP中prado::createComponent方法的典型用法代码示例。如果您正苦于以下问题:PHP prado::createComponent方法的具体用法?PHP prado::createComponent怎么用?PHP prado::createComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类prado
的用法示例。
在下文中一共展示了prado::createComponent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onInit
public function onInit($param)
{
//first i like to get all records...
$mydata = array();
// populates post data into the repeater
$companies = $this->buildData();
foreach ($companies as $companie) {
$criteria_p = new TActiveRecordCriteria();
$criteria_p->Condition = 'idta_partei = :idta_partei';
$criteria_p->Parameters[':idta_partei'] = $companie->idta_partei;
$templisteadresse = ParteiAdresseRecord::finder()->findAll($criteria_p);
$listeadresse = (array) $templisteadresse;
//print_r($listeadresse);
foreach ($listeadresse as $walker) {
$conditionx = new TActiveRecordCriteria();
$conditionx->Condition = 'idta_adresse = :idta_adresse';
$conditionx->Parameters[':idta_adresse'] = $walker->idta_adresse;
array_push($mydata, AdresseRecord::finder()->find($conditionx));
}
}
//print_r($mydata);
$ii = 0;
foreach ($mydata as $mylocaladress) {
$marker = prado::createComponent('BActiveGoogleMapMarker');
$marker->setID("p" . $ii);
//$marker->setTitle('Adress:'.$mylocaladress->adresse_town."-".$mylocaladress->adresse_street);
$marker->setTitle('Standort');
$marker->setPoint(array($mylocaladress->adresse_lat, $mylocaladress->adresse_long));
$marker->setVisible(true);
$infobulle = prado::createComponent('TLabel');
$infobulle->setID('greentradeinfo' . $mylocaladress->idta_adresse);
$infobulle->setText("Klappt");
$marker->addedControl($infobulle);
$this->GoogleMap->addMarker($marker);
if ($ii == 0) {
$this->GoogleMap->setCenter("(" . implode(",", array($mylocaladress->adresse_lat, $mylocaladress->adresse_long)) . ")");
}
$ii++;
}
}
示例2: createStar
/**
* Creates a {@link EtkStar} object, sets {@link TControl::getID ID} property,
* and the {@link EtkStar::getStarType StarType} property.
*/
protected function createStar($starType, $index)
{
$star = prado::createComponent('EtkStar');
$star->setID($this->getClientID() . '_' . $index);
$star->setStarType($starType);
$this->getControls()->add($star);
}