setLink($link); parent::__construct('CancelFormAction', $title, $form, $extraData, $extraClass); } function setLink($link) { $this->link = $link; } function getLink() { return $this->link; } function Field($properties = array()) { $properties = array_merge( $properties, array( 'id' => $this->id(), 'name' => $this->action, 'class' => 'action cancel roundedButton ' . ($this->extraClass() ? $this->extraClass() : ''), 'name' => $this->action, 'href' => $this->getLink() ) ); if($this->isReadonly()) { $properties['disabled'] = 'disabled'; $properties['class'] = $properties['class'] . ' disabled'; } return FormField::create_tag('a', $properties, $this->buttonContent ? $this->buttonContent : $this->Title()); } }