Update docblocks

This commit is contained in:
Will Rossiter 2013-10-15 11:26:23 +13:00
parent 14e5c80dad
commit 8febaeafb9
10 changed files with 50 additions and 21 deletions

View File

@ -1,5 +1,9 @@
<?php <?php
/**
* @package framework
* @subpackage admin
*/
class AdminRootController extends Controller { class AdminRootController extends Controller {
/** /**

View File

@ -10,8 +10,8 @@
* _t('CMSBatchActions.PUBLISHED_PAGES', 'published %d pages'))); * _t('CMSBatchActions.PUBLISHED_PAGES', 'published %d pages')));
* </code> * </code>
* *
* @package cms * @package framework
* @subpackage batchaction * @subpackage admin
*/ */
abstract class CMSBatchAction extends Object { abstract class CMSBatchAction extends Object {

View File

@ -3,8 +3,8 @@
/** /**
* Special request handler for admin/batchaction * Special request handler for admin/batchaction
* *
* @package cms * @package framework
* @subpackage batchaction * @subpackage admin
*/ */
class CMSBatchActionHandler extends RequestHandler { class CMSBatchActionHandler extends RequestHandler {

View File

@ -1,6 +1,11 @@
<?php <?php
/** /**
* Deals with special form handling in CMS, mainly around {@link PjaxResponseNegotiator} * Deals with special form handling in CMS, mainly around
* {@link PjaxResponseNegotiator}
*
* @package framework
* @subpackage admin
*/ */
class CMSForm extends Form { class CMSForm extends Form {

View File

@ -1,12 +1,15 @@
<?php <?php
/** /**
* Interface to provide enough information about a record to make it previewable * Interface to provide enough information about a record to make it previewable
* through the CMS. It uses the record database ID, its "frontend" and "backend" links * through the CMS. It uses the record database ID, its "frontend" and "backend"
* to link up the edit form with its preview. * links to link up the edit form with its preview.
* *
* Also used by {@link SilverStripeNavigator} to generate links - * Also used by {@link SilverStripeNavigator} to generate links - both within
* both within the CMS preview, and as a frontend utility * the CMS preview, and as a frontend utility for logged-in CMS authors in
* for logged-in CMS authors in custom themes (with the $SilverStripeNavigator template marker). * custom themes (with the $SilverStripeNavigator template marker).
*
* @package framework
* @subpackage admin
*/ */
interface CMSPreviewable { interface CMSPreviewable {
@ -17,8 +20,9 @@ interface CMSPreviewable {
public function Link(); public function Link();
/** /**
* @return String Absolute URL to the CMS-author view. Should point to a controller subclassing {@link LeftAndMain}. * @return String Absolute URL to the CMS-author view. Should point to a
* Example: http://mysite.com/admin/edit/6 * controller subclassing {@link LeftAndMain}. Example:
* http://mysite.com/admin/edit/6
*/ */
public function CMSEditLink(); public function CMSEditLink();

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @package framework
* @subpackage admin
*/
class CMSProfileController extends LeftAndMain { class CMSProfileController extends LeftAndMain {
private static $url_segment = 'myprofile'; private static $url_segment = 'myprofile';
@ -22,18 +27,21 @@ class CMSProfileController extends LeftAndMain {
$this->setCurrentPageID(Member::currentUserID()); $this->setCurrentPageID(Member::currentUserID());
$form = parent::getEditForm($id, $fields); $form = parent::getEditForm($id, $fields);
if($form instanceof SS_HTTPResponse) return $form;
if($form instanceof SS_HTTPResponse) {
return $form;
}
$form->Fields()->removeByName('LastVisited'); $form->Fields()->removeByName('LastVisited');
$form->Fields()->push(new HiddenField('ID', null, Member::currentUserID())); $form->Fields()->push(new HiddenField('ID', null, Member::currentUserID()));
$form->setValidator(new Member_Validator());
$form->Actions()->push( $form->Actions()->push(
FormAction::create('save',_t('CMSMain.SAVE', 'Save')) FormAction::create('save',_t('CMSMain.SAVE', 'Save'))
->addExtraClass('ss-ui-button ss-ui-action-constructive') ->addExtraClass('ss-ui-button ss-ui-action-constructive')
->setAttribute('data-icon', 'accept') ->setAttribute('data-icon', 'accept')
->setUseButtonTag(true) ->setUseButtonTag(true)
); );
$form->Actions()->removeByName('action_delete'); $form->Actions()->removeByName('action_delete');
$form->setValidator(new Member_Validator());
$form->setTemplate('Form'); $form->setTemplate('Form');
$form->setAttribute('data-pjax-fragment', null); $form->setAttribute('data-pjax-fragment', null);
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');

View File

@ -1,10 +1,11 @@
<?php <?php
/** /**
* Imports {@link Group} records by CSV upload, as defined in * Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}. * {@link GroupCsvBulkLoader}.
* *
* @package cms * @package framework
* @subpackage batchactions * @subpackage admin
*/ */
class GroupImportForm extends Form { class GroupImportForm extends Form {

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Plug-ins for additional functionality in your LeftAndMain classes. * Plug-ins for additional functionality in your LeftAndMain classes.
* *

View File

@ -1,10 +1,11 @@
<?php <?php
/** /**
* Imports {@link Member} records by CSV upload, as defined in * Imports {@link Member} records by CSV upload, as defined in
* {@link MemberCsvBulkLoader}. * {@link MemberCsvBulkLoader}.
* *
* @package cms * @package framework
* @subpackage batchactions * @subpackage admin
*/ */
class MemberImportForm extends Form { class MemberImportForm extends Form {

View File

@ -1,8 +1,10 @@
<?php <?php
/** /**
* Security section of the CMS * Security section of the CMS
* @package cms *
* @subpackage security * @package framework
* @subpackage admin
*/ */
class SecurityAdmin extends LeftAndMain implements PermissionProvider { class SecurityAdmin extends LeftAndMain implements PermissionProvider {
@ -60,7 +62,10 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
// TODO Duplicate record fetching (see parent implementation) // TODO Duplicate record fetching (see parent implementation)
$record = $this->getRecord($id); $record = $this->getRecord($id);
if($record && !$record->canView()) return Security::permissionFailure($this);
if($record && !$record->canView()) {
return Security::permissionFailure($this);
}
$memberList = GridField::create( $memberList = GridField::create(
'Members', 'Members',