Advertisement
Guest User

Untitled

a guest
Jan 10th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. class TronsForm extends Form
  2. {
  3.  
  4.  
  5. /**
  6. * @return array
  7. */
  8. public function getAttributes() {
  9. $attrs = array(
  10. 'id' => $this->FormName(),
  11. 'action' => $this->FormAction(),
  12. 'method' => $this->FormMethod(),
  13. 'enctype' => $this->getEncType(),
  14. 'target' => $this->target,
  15. 'class' => $this->extraClass(),
  16. 'me-cry' => $this->FormName(),
  17. 'why-cry-smeagol' => $this->FormName(),
  18. 'why-cry-tron' => $this->FormName(),
  19. 'v-on:submit' => $this->FormName(),
  20. 'v-on' => $this->FormName(),
  21. 'p-on' => $this->FormName(),
  22. );
  23.  
  24. if($this->validator && $this->validator->getErrors()) {
  25. if(!isset($attrs['class'])) $attrs['class'] = '';
  26. $attrs['class'] .= ' validationerror';
  27. }
  28.  
  29. $attrs = array_merge($attrs, $this->attributes);
  30.  
  31. return $attrs;
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement