Adds a property depending column-element to the form

@param \Zend\Form\Form						 $form	 Form object to add the element to
@param \ZF2DoctrineCrudHandler\Reader\Property $property Property to generate the element from
@return null
550329
protected function addColumnElementToForm(Form $form, Property $property) {
		$annotationType = $property->getAnnotation()->type;
		$label = $property->getName();
		switch ($annotationType) {
			case 'datetime':
				$element = new DateTime($property->getName());
				break;
			case 'date':
				$element = new Date($property->getName());
				break;
			case 'time':
				$element = new Time($property->getName());
				break;
			case 'text':
				$element = new Textarea($property->getName());
				break;
			case 'boolean':
				$element = new Checkbox($property->getName());
				break;
			default:
				if (in_array($property->getName(), $this->emailProperties)) {
					$element = new Email($property->getName());
				} elseif (in_array($property->getName(), $this->passwordProperties)) {
					$element = new Password($property->getName());
					$element->setLabel($property->getName());
					$form->add($element);
				
					$element = new Password($property->getName() . '2');   //repeat password field
					$label = $property->getName() . ' (repeat)';
				} else {
					$element = new Text($property->getName());
				}
				break;
		}
		
		$element->setLabel($label);
		$form->add($element);
	}
818935
protected function addFieldDefaultValue(&$property, Field $field)
    {
        if (!is_null($field->dataValue) && !$field->nullable) {
            $property .= sprintf("->default('%s')", $field->dataValue);
        }

        return $this;
    }
641934
protected function &getProperty(&$element, $property, $fallback = null)
    {
        if (is_array($element) && (isset($element[$property]) || array_key_exists($property, $element)) /*$this->checkMode == self::CHECK_MODE_TYPE_CAST*/) {
            return $element[$property];
        } elseif (is_object($element) && property_exists($element, $property)) {
            return $element->$property;
        }

        return $fallback;
    }
415738
public function property($name, $type = null, $db_location = null, $with_form = 0, $restrictions = array(), $form_components = array()) {

    if (is_a($name, 'XClassProperty')) {
      $this->properties[$name->name()] = $name;
    } else {
      if (is_array($name)) {
        $current_property = new XClassProperty($name);
        $this->properties[$current_property->name()] = $current_property;
      } else {

        $current_property = new XClassProperty(
                                                array(
                                                  'name'  =>  $name,
                                                  'type'  =>  $type,
                                                  'defaultValue'  =>  null,
                                                  'value'   =>  null,
                                                  'db_location' => $db_location
                                                )
                                              );

        $this->properties[$name] = $current_property;

      }
    }
	}
1282387
public function add($property)
    {
        $iri    = IriFactory::create($property);
        $values = (is_object($property) && isset($property->values)) ? (array)$property->values : [];

        // Create the property values list if necessary
        if (!$this->offsetExists($iri)) {
            $this->offsetSet($iri, $values);

            return;
        }

        $propertyValues =& $this->offsetGet($iri);
        $propertyValues = array_merge($propertyValues, $values);
    }
845156
protected function addFormElements(\Zend_Form $form)
    {
        // Veld inlognaam
        $element = $form->createElement('text', 'email');
        $element->setLabel($this->_('Your E-Mail address'))
                ->setAttrib('size', 30)
                ->setRequired(true)
                ->addValidator('SimpleEmail');

        $form->addElement($element);

        return $element;
    }
334094
public function addClassProperty()
    {
        if(!$this->isXmlHttpRequest()){
            throw new common_exception_BadRequest('wrong request mode');
        }

        $clazz = $this->getClass($this->getRequestParameter('id'));

        if($this->hasRequestParameter('index')){
            $index = intval($this->getRequestParameter('index'));
        }
        else{
            $index = count($clazz->getProperties(false)) + 1;
        }

        $propMode = 'simple';
        if($this->hasSessionAttribute('property_mode')){
            $propMode = $this->getSessionAttribute('property_mode');
        }

        //instanciate a property form
        $propFormClass = 'tao_actions_form_'.ucfirst(strtolower($propMode)).'Property';
        if(!class_exists($propFormClass)){
            $propFormClass = 'tao_actions_form_SimpleProperty';
        }

        $propFormContainer = new $propFormClass($clazz, $clazz->createProperty('Property_'.$index), array('index' => $index));
        $myForm = $propFormContainer->getForm();

        $this->setData('data', $myForm->renderElements());
        $this->setView('blank.tpl', 'tao');
    }
756003
public function addPropertyValues($property,$values){
		if(\is_array($values)===false){
			$values=\array_fill(0, $this->count(),$values);
		}
		foreach ($values as $i=>$value){
			if(isset($this->content[$i])){
				$this->content[$i++]->addToProperty($property,$value);
			}
			else{
				return $this;
			}
		}
		return $this;
	}
1273279
protected function addFormElements(\Zend_Form $form)
    {
        $this->saveLabel = $this->_('Save Two Factor Setup');

        $this->authenticator->addSetupFormElements($form, $this->user, $this->formData);

        if ($this->user->canSaveTwoFactorKey()) {
            $options = [
                'label' => $this->_('Enabled'),
                ];

            $keyElement = $form->createElement('Checkbox', 'twoFactorEnabled', $options);
            $form->addElement($keyElement);
        }
    }
506533
public function Field($properties = array())
    {
        $properties = array_merge($properties, array(
            'Options' => $this->getOptions(),
        ));

        return FormField::Field($properties);
    }
181868
public function addProperty($name, $property=null) {
		$name = strtolower($name);
		if($property === null)
			$property = 'string';
		if(is_string($property))
			$property = ['type'=>$property];
		if(is_array($property)) {
			foreach($property as $k=>$v) {
				if(is_int($k)) {
					unset($property[$k]);
					$property[$v] = true;
				}
			}

			if(!isset($property['type']) || !$property['type'])
				$property['type'] = 'string';

			$type = $property['type'];
			$property = $this->getContainer()->make('Asgard.Entity.PropertyType.'.$type, [$property], function($params) use($type) {
				$class = '\Asgard\Entity\Property\\'.ucfirst(strtolower($type)).'Property';
				return new $class($params);
			});
		}

		$property->setDefinition($this);
		$property->setName($name);

		if($property->getPosition() === null)
			$property->setPosition(count($this->properties)+1);
		$this->properties[$name] = $property;

		uasort($this->properties, function($a, $b) {
			return $a->getPosition() > $b->getPosition();
		});
	}
1211192
private function renderProperties(&$form, $property)
	{
		$htmlOptions = array(
			'class' => 'pure-input-2-3'
		);

		$validators = $this->model->getValidators($property->name);
		$stringValidators = $this->model->getStringValidator($property->name, $validators);

		if (in_array('required', $stringValidators))
			$htmlOptions['required'] = true;

		echo CHtml::openTag('div', array('class' => 'pure-control-group'));

			if (in_array('boolean', $stringValidators))
				$form->toggleButtonRow($this->model, $property->name, $htmlOptions, $validators);
			else if (in_array('number', $stringValidators) && isset($validators[0]->max) && isset($validators[0]->min))
				$form->rangeFieldRow($this->model, $property->name, $htmlOptions, $validators);
			else if (in_array('number', $stringValidators) && (isset($validators[0]->max) || isset($validators[0]->min)))
				$form->numberFieldRow($this->model, $property->name, $htmlOptions, $validators);
			else if (in_array('password', $stringValidators))
				echo $form->passwordFieldRow($this->model, $property->name, $htmlOptions, $validators);
			else
				echo $form->textFieldRow($this->model, $property->name, $htmlOptions, $validators);

		echo CHtml::closeTag('div');
	}
262423
private function addCondition($property, $condition)
    {
        $currentCondition = $property->getVisibleCondition();
        if ((!($currentCondition instanceof ConditionChainInterface))
            || ($currentCondition->getConjunction() != ConditionChainInterface::OR_CONJUNCTION)
        ) {
            if ($currentCondition === null) {
                $currentCondition = new PropertyConditionChain([$condition]);
            } else {
                $currentCondition = new PropertyConditionChain([$currentCondition, $condition]);
            }
            $currentCondition->setConjunction(ConditionChainInterface::OR_CONJUNCTION);
            $property->setVisibleCondition($currentCondition);
        } else {
            $currentCondition->addCondition($condition);
        }
    }
517928
protected function addGetterSetter($property) {
		$properyName = $this->parseMethodName($property, '');
		$getter = "get{$properyName}";
		$setter = "set{$properyName}";
		
		// Extract array to $type, $default, $primary
		$type = null;
		extract($this->getNames()->properties[$property]);
		
		// Type Cast
		$cast = '';
		if ($type == 'int')
			$cast = '(int)';
		
		//METHODS
		// METHOD:getPropperty
		$method = $this->buildMethod($getter);
		$body = <<<MBODY
return {$cast}\$this->{$property};
MBODY;
		$method->setBody($body);
		$method->setDocBlock(DocBlockGenerator::fromArray([
			'shortDescription' => "Get the {$property} property",
			'tags' => [
			new ReturnTag(['datatype' => $type])
			]]));
		$this->_class->addMethodFromGenerator($method);
		
		//===============================================
		
		// METHOD:setPropperty
		$parameterSetter = new ParameterGenerator();
		$parameterSetter->setName($property);
		$method = $this->buildMethod($setter);
		$method->setParameter($parameterSetter);
		$body = <<<MBODY
\$this->{$property} = \${$property};
return \$this;
MBODY;
		$method->setBody($body);
		$method->setDocBlock(DocBlockGenerator::fromArray([
			'shortDescription' => "Set the {$property} property",
			'tags' => [
				new ParamTag($property, ['datatype' => $type]),
				new ReturnTag(['datatype'  => $this->getNames()->entityName])
			]]));
		$this->_class->addMethodFromGenerator($method);
	}
900304
public function bind(&$property) : FormObjectFieldBindingBuilder
    {
        $typeDefiner  = $this->class->property($property);
        $propertyName = $this->loadTypeDefiner($typeDefiner);

        return new FormObjectFieldBindingBuilder(function (IField $field) use ($propertyName) {
            $this->fieldPropertyMap[$field->getName()] = $propertyName;
        });
    }
98356
protected function prepareForm(Form $form)
	{
		$form->getElementPrototype()->class[] = 'form-horizontal';
		$translator = $form->getTranslator();
		foreach ($form->controls as $control) {
			/** @var BaseControl $control */
			if ($control instanceof HiddenField) {
				continue;
			} elseif ($control instanceof Button) {
				$control->controlPrototype->class[] = "btn-block btn-lg";
			} else {
				if ($control->getLabel()) {
					$control->setAttribute('placeholder', $control->caption);
					if (empty($control->controlPrototype->attrs['title'])) {
						$control->setAttribute('title', $translator ? $translator->translate($control->caption) : $control->caption);
					}
					$control->getLabelPrototype()->attrs["style"] = "display:none";
				}
			}
		}
		BootstrapHelper::ApplyBootstrapToControls($form);
	}
438813
public function appendProperty($property) {
    if (is_string($property)) {
      $property = ClassMemberListNode::create($property);
    }
    $properties = $this->statements->children(Filter::isInstanceOf('\Pharborist\ClassMemberListNode'));
    if ($properties->count() === 0) {
      $this->statements->firstChild()->after($property);
    }
    else {
      $properties->last()->after($property);
    }
    FormatterFactory::format($this);
    return $this;
  }