code/pages/WikiPage.php
public function edit() {
		HtmlEditorField::include_js();
//		Requirements::javascript('simplewiki/javascript/sslinks/editor_plugin_src.js');

		$existing = $this->getEditingLocks($this->data(), true);
		// oops, we've somehow got here even though we shouldn't have
		if ($existing && $existing['user'] != Member::currentUser()->Email) {
			return $this->redirect($this->data()->Link());
		}

		if (!$this->data()->canEdit()) {
			return Security::permissionFailure($this);
		}

		$this->form = $this->EditForm();

		// check who's editing and whether or not we should bail out
		return $this->renderWith(array('WikiPage', 'Page'));
	}
public function edit() {
		HtmlEditorField::include_js();
//		Requirements::javascript('simplewiki/javascript/sslinks/editor_plugin_src.js');

		$existing = $this->getEditingLocks($this->data(), true);
		// oops, we've somehow got here even though we shouldn't have
		if ($existing && $existing['user'] != Member::currentUser()->Email) {
			return $this->redirect($this->data()->Link());
		}

		if (!$this->data()->canEdit()) {
			return Security::permissionFailure($this);
		}

		$this->form = $this->EditForm();

		// check who's editing and whether or not we should bail out
		return $this->renderWith(array('WikiPage', 'Page'));
	}
public function edit ( ) { HtmlEditorField :: include_js ( ) ; //		Requirements::javascript('simplewiki/javascript/sslinks/editor_plugin_src.js'); $ existing = $ this -> getEditingLocks ( $ this -> data ( ) , true ) ; // oops, we've somehow got here even though we shouldn't have if ( $ existing && $ existing [ 'user' ] != Member :: currentUser ( ) -> Email ) { return $ this -> redirect ( $ this -> data ( ) -> Link ( ) ) ; } if ( ! $ this -> data ( ) -> canEdit ( ) ) { return Security :: permissionFailure ( $ this ) ; } $ this -> form = $ this -> EditForm ( ) ; // check who's editing and whether or not we should bail out return $ this -> renderWith ( array ( 'WikiPage' , 'Page' ) ) ; }
Action handler for editing this wiki page

Creates a form that's used for editing the page's content,
as well as adding in a couple of additional toolbar actions
for adding a simple link and a simple image
Action handler for editing this wiki page