Remove a few more references

This commit is contained in:
Aaron Carlino 2017-08-07 12:09:39 +12:00
parent 6c0629f025
commit e4935123d8
9 changed files with 12 additions and 35 deletions

View File

@ -600,4 +600,4 @@ for adding notes for other developers but for things you don't want published in
## API Documentation
* [SSViewer](api:SilverStripe\View\SSViewer)
* [SS_TemplateManifest](api:SS_TemplateManifest)
* [ThemeManifest](api:SilverStripe\View\ThemeManifest)

View File

@ -71,7 +71,7 @@ JavaScript in a separate file and instead load, via search and replace, several
```php
$vars = [
"MemberID" => Member::currentUserID(),
"MemberID" => Security::getCurrentUser()->ID,
];
Requirements::javascriptTemplate("<my-module-dir>/javascript/some_file.js", $vars);

View File

@ -16,7 +16,7 @@ name, and normally they all exist under the `Root` [TabSet](api:SilverStripe\For
<div class="notice" markdown="1">
[TabSet](api:SilverStripe\Forms\TabSet) instances can contain child [Tab](api:SilverStripe\Forms\Tab) and further [TabSet](api:SilverStripe\Forms\TabSet) instances, however the CMS UI will only
display up to two levels of tabs in the interface. If you want to group data further than that, try [ToggleField](api:ToggleField).
display up to two levels of tabs in the interface.
</div>
## Adding a field to a tab

View File

@ -18,7 +18,6 @@ on the SilverStripe API documentation.
## Actions
* [FormAction](api:SilverStripe\Forms\FormAction): Button element for forms, both for `<input type="submit">` and `<button>`.
* [ResetFormAction](api:ResetFormAction): Action that clears all fields on a form.
## Formatted input
@ -53,7 +52,6 @@ doesn't necessarily have any visible styling.
## Relations
* [CheckboxSetField](api:SilverStripe\Forms\CheckboxSetField): Displays a set of checkboxes as a logical group.
* [TableField](api:TableField): In-place editing of tabular data.
* [TreeDropdownField](api:SilverStripe\Forms\TreeDropdownField): Dropdown-like field that allows you to select an item from a hierarchical AJAX-expandable tree.
* [TreeMultiselectField](api:SilverStripe\Forms\TreeMultiselectField): Represents many-many joins using a tree selector shown in a dropdown-like element
* [GridField](api:SilverStripe\Forms\GridField\GridField): Displays a [SS_List](api:SilverStripe\ORM\SS_List) in a tabular format. Versatile base class which can be configured to allow editing, sorting, etc.

View File

@ -140,7 +140,7 @@ we added a `SayHi` method which is unique to our extension.
If the `Extension` needs to modify an existing method it's a little trickier. It requires that the method you want to
customise has provided an *Extension Hook* in the place where you want to modify the data. An *Extension Hook* is done
through the [Object::extend()](api:Object::extend()) method.
through the `extend()` method of the [Extensible](api:SilverStripe\Core\Extensible) trait.
**framework/security/Member.php**
@ -256,8 +256,8 @@ In your [Extension](api:SilverStripe\Core\Extension) class you can only refer to
## Checking to see if an Object has an Extension
To see what extensions are currently enabled on an object, use [Object::getExtensionInstances()](api:Object::getExtensionInstances()) and
[Object::hasExtension()](api:Object::hasExtension())
To see what extensions are currently enabled on an object, use the [getExtensionInstances()](api:SilverStripe\Core\Extensible::getExtensionInstances()) and
[hasExtension()](api:SilverStripe\Core\Extensible::hasExtension()) methods of the [Extensible](api:SilverStripe\Core\Extensible) trait.
```php
$member = Security::getCurrentUser();
@ -268,10 +268,10 @@ To see what extensions are currently enabled on an object, use [Object::getExten
}
```
## Object extension injection points
## Extension injection points
`Object` has two additional methods, `beforeExtending` and `afterExtending`, each of which takes a method name and a
callback to be executed immediately before and after `Object::extend()` is called on extensions.
`Extensible` has two additional methods, `beforeExtending` and `afterExtending`, each of which takes a method name and a
callback to be executed immediately before and after `extend()` is called on extensions.
This is useful in many cases where working with modules such as `Translatable` which operate on `DataObject` fields
that must exist in the `FieldList` at the time that `$this->extend('UpdateCMSFields')` is called.
@ -324,7 +324,6 @@ This method is preferred to disabling, enabling, and calling field extensions ma
## Related Documentaion
* [Injector](injector/)
* [Object::useCustomClass](api:Object::useCustomClass)
## API Documentation

View File

@ -14,7 +14,7 @@ For informational and debug logs, you can use the Logger directly. The Logger is
can be accessed via the `Injector`:
```php
Injector::inst()->get(LoggerInterface::class)->info('User has logged in: ID #' . Member::currentUserID());
Injector::inst()->get(LoggerInterface::class)->info('User has logged in: ID #' . Security::getCurrentUser()->ID);
Injector::inst()->get(LoggerInterface::class)->debug('Query executed: ' . $sql);
```

View File

@ -29,6 +29,5 @@ The [Debug](api:SilverStripe\Dev\Debug) class contains a number of static utilit
## API Documentation
* [SS_Log](api:SS_Log)
* [Backtrace](api:SilverStripe\Dev\Backtrace)
* [Debug](api:SilverStripe\Dev\Debug)

View File

@ -8,23 +8,6 @@ The [Member](api:SilverStripe\Security\Member) class is used to represent user a
## Testing For Logged In Users
The [Member](api:SilverStripe\Security\Member) class comes with 2 static methods for getting information about the current logged in user.
**Member::currentUserID()**
Retrieves the ID (int) of the current logged in member. Returns *0* if user is not logged in. Much lighter than the
next method for testing if you just need to test.
```php
// Is a member logged in?
if( Member::currentUserID() ) {
// Yes!
} else {
// No!
}
```
**Security::getCurrentUser()**
Returns the full *Member* Object for the current user, returns *null* if user is not logged in.

View File

@ -311,13 +311,11 @@ Example: Add a 'loading' classname to all pressed buttons
jQuery is based around collections of DOM elements, the library functions typically handle multiple elements (where it
makes sense). Encapsulate your code by nesting your jQuery commands inside a `jQuery().each()` call.
Example: ComplexTableField implements a paginated table with a pop-up for displaying
```js
$('div.ComplexTableField').each(function() {
// This is the over code for the tr elements inside a ComplexTableField.
$('div.MyGridField').each(function() {
// This is the over code for the tr elements inside a GridField.
$(this).find('tr').hover(
// ...
);