Skip to content

Commit

Permalink
Merge pull request sonata-project#2149 from pborreli/typos-19
Browse files Browse the repository at this point in the history
Fixed typos
  • Loading branch information
rande committed May 20, 2014
2 parents 0f9465b + dfa4516 commit 4b7cd58
Show file tree
Hide file tree
Showing 46 changed files with 159 additions and 164 deletions.
2 changes: 1 addition & 1 deletion Block/AdminSearchBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ public function setDefaultSettings(OptionsResolverInterface $resolver)
'per_page' => 10,
));
}
}
}
1 change: 0 additions & 1 deletion Builder/ListBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ public function buildField($type = null, FieldDescriptionInterface $fieldDescrip
* @param \Sonata\AdminBundle\Admin\AdminInterface $admin
*/
public function addField(FieldDescriptionCollection $list, $type = null, FieldDescriptionInterface $fieldDescription, AdminInterface $admin);

}
1 change: 0 additions & 1 deletion Builder/ShowBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ public function getBaseList(array $options = array());
* @return void
*/
public function addField(FieldDescriptionCollection $list, $type = null, FieldDescriptionInterface $fieldDescription, AdminInterface $admin);

}
2 changes: 1 addition & 1 deletion Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function batchActionDelete(ProxyQueryInterface $query)
try {
$modelManager->batchDelete($this->admin->getClass(), $query);
$this->addFlash('sonata_flash_success', 'flash_batch_delete_success');
} catch ( ModelManagerException $e ) {
} catch (ModelManagerException $e) {
$this->addFlash('sonata_flash_error', 'flash_batch_delete_error');
}

Expand Down
2 changes: 1 addition & 1 deletion Datagrid/Datagrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function($value) { return $value instanceof FieldDescriptionInterface ? $value->

if (isset($this->values['_sort_by'])) {
if (!$this->values['_sort_by'] instanceof FieldDescriptionInterface) {
throw new UnexpectedTypeException($this->values['_sort_by'],'FieldDescriptionInterface');
throw new UnexpectedTypeException($this->values['_sort_by'], 'FieldDescriptionInterface');
}

if ($this->values['_sort_by']->isSortable()) {
Expand Down
2 changes: 1 addition & 1 deletion Form/Type/ModelTypeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* This type is used to render an hidden input text and 3 links
* - an add form modal
* - a list modal to select the targetted entities
* - a list modal to select the targeted entities
* - a clear selection link
*/
class ModelTypeList extends AbstractType
Expand Down
6 changes: 3 additions & 3 deletions Mapper/BaseGroupedMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ abstract class BaseGroupedMapper extends BaseMapper

protected $currentGroup;

protected abstract function getGroups();

protected abstract function setGroups(array $groups);
abstract protected function getGroups();

abstract protected function setGroups(array $groups);

/**
* @param string $name
* @param array $options
Expand Down
19 changes: 9 additions & 10 deletions Mapper/BaseMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ abstract class BaseMapper
{

protected $admin;

protected $builder;

/**
* @param \Sonata\AdminBundle\Builder\BuilderInterface $builder
* @param \Sonata\AdminBundle\Admin\AdminInterface $admin
Expand All @@ -33,41 +33,40 @@ public function __construct(BuilderInterface $builder, AdminInterface $admin)
$this->builder = $builder;
$this->admin = $admin;
}

/**
* @return \Sonata\AdminBundle\Admin\AdminInterface
*/
public function getAdmin()
{
return $this->admin;
}

/**
* @param string $key
*
* @return mixed
*/
public abstract function get($key);
abstract public function get($key);

/**
* @param string $key
*
* @return boolean
*/
public abstract function has($key);
abstract public function has($key);

/**
* @param string $key
*
* @return \Sonata\AdminBundle\Mapper\BaseMapper
*/
public abstract function remove($key);
abstract public function remove($key);

/**
* @param array $keys field names
*
* @return \Sonata\AdminBundle\Mapper\BaseMapper
*/
public abstract function reorder(array $keys);

abstract public function reorder(array $keys);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Modifying form fields dynamically depending on edited object
============================================================

It's a quite common situation when you need to modify your form's fields because of edited object's properties or structure. Let's assume you only want to display an admin form field for new objects and you don't want it to be shown for those objects that have alerady been saved to the database and now are being edited.
It's a quite common situation when you need to modify your form's fields because of edited object's properties or structure. Let's assume you only want to display an admin form field for new objects and you don't want it to be shown for those objects that have already been saved to the database and now are being edited.

This is a way for you to accomplish this.

Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/cookbook/recipe_file_uploads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ happening.
Notes
-----

If you are looking for richer media management fucntionality there is a complete SonataMediaBundle
which caters to this need. It is documentated online and is created and maintained by the same team
If you are looking for richer media management functionality there is a complete SonataMediaBundle
which caters to this need. It is documented online and is created and maintained by the same team
as SonataAdmin.

To learn how to add an image preview to your ImageAdmin take a look at the related cookbook entry.
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/cookbook/recipe_sortable_listing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ First of are going to add a position field in our ``Client`` entity.
In ``ClientAdmin`` our we are going to add in the ``configureListFields`` method a custom action and use the default twig template provided in the pixSortableBehavioBundle
In ``ClientAdmin`` our we are going to add in the ``configureListFields`` method a custom action and use the default twig template provided in the PixSortableBehaviorBundle

.. code-block:: php
Expand All @@ -63,7 +63,7 @@ In order to add new routes for these actions we are also adding the following me
Now you can update your ``admin.yml`` to use the handler provider by the pixSortableBehavioBundle
Now you can update your ``admin.yml`` to use the handler provider by the PixSortableBehaviorBundle

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/action_create_edit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ To do:
- how to create settings/fields that appear on just one of the create/edit views
and any controller changes needed to manage them

.. _`issues on Github`: https://github.com/sonata-project/SonataAdminBundle/issues/1519
.. _`issues on GitHub`: https://github.com/sonata-project/SonataAdminBundle/issues/1519
2 changes: 1 addition & 1 deletion Resources/doc/reference/action_delete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Deleting objects

This document is a stub representing a new work in progress. If you're reading
this you can help contribute, **no matter what your experience level with Sonata
is**. Check out the `issues on Github`_ for more information about how to get involved.
is**. Check out the `issues on GitHub`_ for more information about how to get involved.

This document will cover the Delete action and any related configuration options.

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/action_export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Export action

This document is a stub representing a new work in progress. If you're reading
this you can help contribute, **no matter what your experience level with Sonata
is**. Check out the `issues on Github`_ for more information about how to get involved.
is**. Check out the `issues on GitHub`_ for more information about how to get involved.

This document will cover the Export action and related configuration options.

Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/reference/action_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The List View

This document is a stub representing a new work in progress. If you're reading
this you can help contribute, **no matter what your experience level with Sonata
is**. Check out the `issues on Github`_ for more information about how to get involved.
is**. Check out the `issues on GitHub`_ for more information about how to get involved.

This document will cover the List view which you use to browse the objects in your
system. It will cover configuration of the list itself and the filters you can use
Expand Down Expand Up @@ -228,4 +228,4 @@ To do:
- targeting submodel fields using dot-separated notation
- advanced filter options (global_search)

.. _`issues on Github`: https://github.com/sonata-project/SonataAdminBundle/issues/1519
.. _`issues on GitHub`: https://github.com/sonata-project/SonataAdminBundle/issues/1519
2 changes: 1 addition & 1 deletion Resources/doc/reference/action_show.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Show action

This document is a stub representing a new work in progress. If you're reading
this you can help contribute, **no matter what your experience level with Sonata
is**. Check out the ``issues on Github`` _ for more information about how to get involved.
is**. Check out the ``issues on GitHub`` _ for more information about how to get involved.

This document will cover the Show action and related configuration options.

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ To create your own RouteBuilder create the PHP class and register it as a servic
{
parent::build($admin,$collection);
$collection->add('yourSubAction');
// Create button will dissappear, delete functionality will be disabled as well
// Create button will disappear, delete functionality will be disabled as well
// No more changes needed!
$collection->remove('create');
$collection->remove('delete');
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ you will also find instructions on how to configure ``SonataAdminBundle`` to use
instead of the default ones.

Managing ``Admin`` Service
------------------------------
--------------------------

Your ``Admin`` service definitions are parsed when Symfony2 is loaded, and handled by
the ``Pool`` class. This class, available as the ``sonata.admin.pool`` service from the
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/batch_actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ This method may return three different values:
(Optional) Executing a pre batch hook
-------------------------------------

In your admin class you can create a ``preBacthAction`` method to execute something before doing the batch action.
In your admin class you can create a ``preBatchAction`` method to execute something before doing the batch action.
The main purpose of this method is to alter the query or the list of selected id.

.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ConfigureQueryEvent
This event is generated when a list query is defined. The event name is: ``sonata.admin.event.configure.query``

BlockEvent
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~

Block events help you customize your templates. Available events are :

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/field_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Parameters:
* **url**: url address (e.g. ``http://example.com``)
* **route.name**: route name (e.g. ``acme_demo_homepage``)
* **route.parameters**: array of route parameters (e.g. ``array('type'=>'example', 'display'=>'full')``)
* **route.absolute**: boolean value, create absolute or relative url address based on ``route.name`` and ``route.parameters`` (defalut ``false``)
* **route.absolute**: boolean value, create absolute or relative url address based on ``route.name`` and ``route.parameters`` (default ``false``)
* **route.identifier_parameter_name**: parameter added to ``route.parameters``, it's value is an object identifier (e.g. 'id') to create dynamic links based on rendered objects.

.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ explicitly this defaults to the action name.
{
protected function configureRoutes(RouteCollection $collection)
{
$collection->add('myCustom'); #Action gets added automaticly
$collection->add('myCustom'); // Action gets added automatically
$collection->add('view', $this->getRouterIdParameter().'/view');
}
}
Expand Down
6 changes: 3 additions & 3 deletions Resources/doc/reference/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Later, we will explain how to set up ACL with the
``FriendsOfSymfony/UserBundle``.

Role handler
-----------------
------------

The ``sonata.admin.security.handler.role`` allows you to operate finely on the actions that can be done (depending on the entity class), without requiring to set up ACL.

Expand Down Expand Up @@ -476,14 +476,14 @@ or a permission (``admin.isGranted``):

- **Token:** a token identifies a user between requests;
- **Voter:** sort of judge that returns if access is granted of denied, if the
voter should not vote for a case, it returns abstrain;
voter should not vote for a case, it returns abstain;
- **AccessDecisionManager:** decides if access is granted or denied according
a specific strategy. It grants access if at least one (affirmative strategy),
all (unanimous strategy) or more then half (consensus strategy) of the
counted votes granted access;
- **RoleVoter:** votes for all attributes stating with ``ROLE_`` and grants
access if the user has this role;
- **RoleHierarchieVoter:** when the role ``ROLE_SONATA_ADMIN`` is voted for,
- **RoleHierarchyVoter:** when the role ``ROLE_SONATA_ADMIN`` is voted for,
it also votes "granted" if the user has the role ``ROLE_SUPER_ADMIN``;
- **AclVoter:** grants access for the permissions of the ``Admin`` class if
the user has the permission, the user has a permission that is included in
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/reference/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Other Templates
There are several other templates that can be customized, enabling you to fine-tune
``SonataAdminBundle``:

* user_block: customizes the Twig block rendered by default in the top right corner of the admin interface, containing user information. Empty by defautl, see ``SonataUserBundle`` for a real example.
* user_block: customizes the Twig block rendered by default in the top right corner of the admin interface, containing user information. Empty by default, see ``SonataUserBundle`` for a real example.
* add_block: customizes the Twig block rendered by default in the top right corner of the admin interface, providing quick access to create operations on available admin classes.
* history_revision_timestamp: customizes the way timestamps are rendered when using history related actions.
* action: a generic template you can use for your custom actions
Expand Down
2 changes: 1 addition & 1 deletion Tests/Admin/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ public function testIsGranted()
$securityHandler=$this->getMock('Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface');
$securityHandler->expects($this->any())
->method('isGranted')
->will($this->returnCallback(function (AdminInterface $adminIn, $attributes, $object = nul) use ($admin, $entity) {
->will($this->returnCallback(function (AdminInterface $adminIn, $attributes, $object = null) use ($admin, $entity) {
if ($admin == $adminIn && $attributes == 'FOO') {
if (($object == $admin) || ($object == $entity)) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Admin/BaseFieldDescriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function testGetValue()
*/
$arg2 = 4;
$twoParameters = array($arg1,$arg2);
$description2 = new FieldDescription();
$description2 = new FieldDescription();
$description2->setOption('code', 'getWithTwoParameters');
$description2->setOption('parameters', $twoParameters);

Expand Down
2 changes: 1 addition & 1 deletion Tests/Admin/FieldDescriptionCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ public function testReorderListWithBatchField()
$actualElements = array_keys($collection->getElements());
$this->assertSame($newOrder, $actualElements, 'the order is wrong');
}
}
}
2 changes: 1 addition & 1 deletion Tests/Command/GenerateAdminCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GenerateAdminCommandTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
// create temp dir
$tempfile=tempnam(sys_get_temp_dir(),'sonata_admin');
$tempfile = tempnam(sys_get_temp_dir(), 'sonata_admin');
if (file_exists($tempfile)) {
unlink($tempfile);
}
Expand Down
Loading

0 comments on commit 4b7cd58

Please sign in to comment.