/**
  * @param string $attribute
  * @return string
  */
 public function getActionAttributesAttributeFormType($attribute)
 {
     assert('is_string($attribute)');
     assert('$this->type != null');
     if ($this->type == self::TYPE_SUBSCRIBE_TO_LIST || $this->type == self::TYPE_UNSUBSCRIBE_FROM_LIST) {
         return 'MarketingList';
     } else {
         $resolvedAttributeName = static::resolveRealAttributeName($attribute);
         $resolvedModelClassName = $this->resolveRealModelClassName($attribute);
         return WorkflowActionAttributeFormFactory::getType($resolvedModelClassName, $resolvedAttributeName);
     }
 }
 public function testGetType()
 {
     $type = WorkflowActionAttributeFormFactory::getType('WorkflowModelTestItem', 'boolean');
     $this->assertEquals('CheckBox', $type);
 }
Ejemplo n.º 3
0
 /**
  * @param string $attribute
  * @return string
  */
 public function getActionAttributesAttributeFormType($attribute)
 {
     assert('is_string($attribute)');
     $resolvedAttributeName = static::resolveRealAttributeName($attribute);
     $resolvedModelClassName = $this->resolveRealModelClassName($attribute);
     return WorkflowActionAttributeFormFactory::getType($resolvedModelClassName, $resolvedAttributeName);
 }