/** * Stores a property. * * @param string $name Property name * @param mixed $value Property value * @param PropelPDO $con Optional. The database connection to use. * Default is NULL. * @return self Returns $this. */ public function setProperty($name, $value, PropelPDO $con = null) { $property = PropertyQuery::create()->filterByAccount($this)->findOneByName($name, $con); if ($property === null) { throw new Exception('Could not find property "' . $name . '".'); } /* @var PropertyValue $propertyValue */ $propertyValue = PropertyValueQuery::create()->filterByDomainId(null)->filterByUserId(null)->findOneByPropertyId($property->getId(), $con); if ($propertyValue === null) { $propertyValue = new PropertyValue(); $propertyValue->setProperty($property); } $propertyValue->set($value)->save($con); return $this; }
/** * Stores a property. * * @param string $name Property name * @param mixed $value Property value * @param PropelPDO $con Optional. The database connection to use. * Default is NULL. * @return BaseObject Returns {@link $object}. */ public static function setProperty(BaseObject $object, $name, $value, PropelPDO $con = null) { $property = PropertyQuery::create()->filterByAccount($object->getAccount($con))->findOneByName($name, $con); if ($property === null) { throw new Exception('Could not find property "' . $name . '".'); } $class = get_class($object); /* @var PropertyValue $propertyValue */ $propertyValue = PropertyValueQuery::create()->{'filterBy' . $class}($object)->findOneByPropertyId($property->getId(), $con); if ($propertyValue === null) { $propertyValue = new PropertyValue(); $propertyValue->setProperty($property)->{'set' . $class}($object); } $propertyValue->set($value)->save($con); return $object; }
/** * Returns a PropertyValue object for the specified base object (User, Domain or Account) * * @param User|Domain|Account $obj The reference object * @throws Exception * @return PropertyValue */ private function getValueObject($obj) { $query = PropertyValueQuery::create(); if ($obj instanceof User) { $query->filterByUser($obj); } elseif ($obj instanceof Domain) { $query->filterByDomain($obj); } elseif ($obj instanceof Account) { $query->filterByAccount($obj); } else { throw new Exception('Invalid base object applied. User, Domain or Account expected!'); } $property_value = $query->findOneByProperty($this); if (!$property_value) { $property_value = new PropertyValue(); $property_value->setProperty($this); if ($obj instanceof User) { $property_value->setUser($obj); } elseif ($obj instanceof Domain) { $property_value->setDomain($obj); } elseif ($obj instanceof Account) { $property_value->setAccount($obj); } } return $property_value; }
</div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'langue_id', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->langue ? $model->langue->nom : ''; ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'show_langs', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo PropertyValue::enumValue('FlagEnumerable', $model->show_langs); ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'account_id', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->account ? CHtml::link($model->account->name, array("/backoffice/entities/account/view", "id" => $model->account->primaryKey)) : ''; ?> </p> </div> <div class="form-group">
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param PropertyValue $obj A PropertyValue object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null PropertyValuePeer::$instances[$key] = $obj; } }
echo $form->label($model, 'code_bic'); ?> <?php echo $form->textArea($model, 'code_bic', array('class' => 'form-control', 'rows' => 3)); ?> <?php echo $form->error($model, 'code_bic'); ?> </div> <div class="form-group"> <?php echo $form->label($model, 'status'); ?> <div class="input-group"> <?php echo $form->radioButtonList($model, 'status', PropertyValue::enumListData('StatusEnumerable', false), array('template' => '<label class="radio-inline">{input}{label}</label>', 'separator' => false)); ?> </div> <?php echo $form->error($model, 'status'); ?> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <?php echo CHtml::submitButton('Save', array('class' => 'btn btn-primary')); ?>
</div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'smsreservation', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->smsreservation; ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'smsactivitation', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo PropertyValue::enumValue('FlagEnumerable', $model->smsactivitation); ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'session_resa', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->session_resa; ?> </p> </div>
<div class="form-group"> <?php echo CHtml::activeLabel($model, 'code_bic', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->code_bic; ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'status', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo PropertyValue::enumValue('StatusEnumerable', $model->status); ?> </p> </div> </div> </div> <div class="col-sm-8"> <div class="the-box form-horizontal"> <h4 class="small-title">SOCIETE</h4> <?php if ($societe) { ?> <div class="row"> <div class="col-sm-6"> <div class="form-group">
/** * @return \yii\db\ActiveQuery */ public function getIdPropertyValue() { return $this->hasOne(PropertyValue::className(), ['id' => 'id_property_value']); }
<?php echo CHtml::link('<i class="fa fa-plus"></i> Create', '#', array('class' => 'btn btn-success', 'data-toggle' => 'modal', 'data-target' => '#create-bank')); ?> </div> <?php } ?> <div class="btn-group"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'form-bank-filter', 'method' => 'get', 'htmlOptions' => array('role' => 'form'))); ?> <?php echo $form->dropDownList($model, 'societe_id', PropertyValue::enumListData('Societe', true, 'id', 'name'), array('class' => 'form-control', 'empty' => 'Any Societe', 'data-placeholder' => "Choose a Societe...", 'onchange' => 'js:$("#form-bank-filter").submit();')); ?> <?php $this->endWidget(); ?> </div> </div> <div class="col-sm-4 pull-right text-right"> <?php $this->widget('application.widgets.GridSummaryText', array('dataProvider' => $dataProvider)); ?> </div> </div>
/** * @param PropertyValue $propertyValue The propertyValue object to add. */ protected function doAddPropertyValue($propertyValue) { $this->collPropertyValues[] = $propertyValue; $propertyValue->setProperty($this); }
/** * Exclude object from result * * @param PropertyValue $propertyValue Object to remove from the list of results * * @return PropertyValueQuery The current query, for fluid interface */ public function prune($propertyValue = null) { if ($propertyValue) { $this->addUsingAlias(PropertyValuePeer::ID, $propertyValue->getId(), Criteria::NOT_EQUAL); } return $this; }
<?php echo $form->radioButtonList($model, 'display_phone', PropertyValue::enumListData('FlagEnumerable', false), array('template' => '<label class="radio-inline">{input} {label}</label>', 'separator' => false)); ?> </div> <?php echo $form->error($model, 'display_phone'); ?> </div> <div class="form-group"> <?php echo $form->label($model, 'application_type_id'); ?> <div class="input-group"> <?php echo $form->dropDownList($model, 'application_type_id', PropertyValue::enumListData('ApplicationType', true, 'id', 'name'), array('class' => 'form-control', 'empty' => 'None', 'data-placeholder' => "Choose an Application Type...")); ?> </div> <?php echo $form->error($model, 'application_type_id'); ?> </div> <div class="form-group"> <?php echo $form->label($model, 'openingdays'); ?> <?php echo $form->textField($model, 'openingdays', array('class' => 'form-control')); ?> <?php
</div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'sav_portable', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->sav_portable; ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'display_phone', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo PropertyValue::enumValue('FlagEnumerable', $model->display_phone); ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'app_type', array('class' => 'col-sm-3 control-label')); ?> <p class="form-control-static col-sm-9"><?php echo $model->applicationType ? $model->applicationType->name : 'None'; ?> </p> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'openingdays', array('class' => 'col-sm-3 control-label'));
/** * Filter the query by a related PropertyValue object * * @param PropertyValue|PropelObjectCollection $propertyValue the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PropertyQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByPropertyValue($propertyValue, $comparison = null) { if ($propertyValue instanceof PropertyValue) { return $this->addUsingAlias(PropertyPeer::ID, $propertyValue->getPropertyId(), $comparison); } elseif ($propertyValue instanceof PropelObjectCollection) { return $this->usePropertyValueQuery()->filterByPrimaryKeys($propertyValue->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPropertyValue() only accepts arguments of type PropertyValue or PropelCollection'); } }
?> <div class="input-group"> <?php echo $form->radioButtonList($model, 'status', PropertyValue::enumListData('StatusEnumerable', false), array('template' => '<label class="radio-inline">{input} {label}</label>', 'separator' => false)); ?> </div> <?php echo $form->error($model, 'status'); ?> </div> <div class="form-group"> <?php echo $form->label($model, 'type'); ?> <?php echo $form->dropDownList($model, 'type', PropertyValue::enumListData('ServiceTypeEnumerable'), array('class' => 'form-control')); ?> <?php echo $form->error($model, 'type'); ?> </div> </div> <div class="col-sm-8"> <h4 class="small-title">DESCRIPTION</h4> <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="#description_en" role="tab" data-toggle="tab">DESCRIPTION EN</a></li> <li><a href="#description_fr" role="tab" data-toggle="tab">DESCRIPTION FR</a></li> <li><a href="#description_es" role="tab" data-toggle="tab">DESCRIPTION ES</a></li> <li><a href="#description_it" role="tab" data-toggle="tab">DESCRIPTION IT</a></li>
<?php echo $form->textField($model, 'postal_code', array('class' => 'form-control')); ?> <?php echo $form->error($model, 'postal_code'); ?> </div> </div> <div class="col-sm-6"> <div class="form-group"> <?php echo $form->label($model, 'country_id'); ?> <?php echo $form->dropDownList($model, 'country_id', PropertyValue::enumListData('Countrylist', true, 'id', 'name'), array('class' => 'form-control chosen-select', 'data-placeholder' => 'Choose a Country...', 'empty' => '')); ?> <?php echo $form->error($model, 'country_id'); ?> </div> <div class="form-group"> <?php echo $form->label($model, 'manager_lastname'); ?> <?php echo $form->textField($model, 'manager_lastname', array('class' => 'form-control')); ?> <?php echo $form->error($model, 'manager_lastname'); ?>