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
/**
* @package framework
* @subpackage admin
*/
class AdminRootController extends Controller {
/**

View File

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

View File

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

View File

@ -1,6 +1,11 @@
<?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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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