8000 Some minor tweaks related to Doctrine docs by bocharsky-bw · Pull Request #7147 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Some minor tweaks related to Doctrine docs #7147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doctrine/event_listeners_subscribers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Creating the Listener Class

In the previous example, a service ``my.listener`` was configured as a Doctrine
listener on the event ``postPersist``. The class behind that service must have
a ``postPersist`` method, which will be called when the event is dispatched::
a ``postPersist()`` method, which will be called when the event is dispatched::

// src/AppBundle/EventListener/SearchIndexer.php
namespace AppBundle\EventListener;
Expand Down
2 changes: 1 addition & 1 deletion doctrine/mapping_model_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ be adapted for your case::
}
}

Note the :phpfunction:`class_exists` check. This is crucial, as you do not want your
Note the :phpfunction:`class_exists()` check. This is crucial, as you do not want your
bundle to have a hard dependency on all Doctrine bundles but let the user
decide which to use.

Expand Down
9 changes: 7 additions & 2 deletions doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ With some validation added, your class may look something like this::
$this->plainPassword = $password;
}

public function getPassword()
{
return $this->password;
}

public function setPassword($password)
{
$this->password = $password;
Expand Down Expand Up @@ -180,8 +185,8 @@ Next, create the form for the ``User`` entity::
'type' => 'password',
'first_options' => array('label' => 'Password'),
'second_options' => array('label' => 'Repeat Password'),
)
);
))
;
}

public function configureOptions(OptionsResolver $resolver)
Expand Down
10 changes: 5 additions & 5 deletions doctrine/resolve_target_entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ brevity) to explain how to set up and use the ``ResolveTargetEntityListener``.

A Customer entity::

// src/Acme/AppBundle/Entity/Customer.php
// src/AppBundle/Entity/Customer.php

namespace Acme\AppBundle\Entity;
namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Acme\CustomerBundle\Entity\Customer as BaseCustomer;
Expand Down Expand Up @@ -118,7 +118,7 @@ about the replacement:
orm:
# ...
resolve_target_entities:
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: Acme\AppBundle\Entity\Customer
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: AppBundle\Entity\Customer

.. code-block:: xml

Expand All @@ -132,7 +132,7 @@ about the replacement:
<doctrine:config>
<doctrine:orm>
<!-- ... -->
<doctrine:resolve-target-entity interface="Acme\InvoiceBundle\Model\InvoiceSubjectInterface">Acme\AppBundle\Entity\Customer</doctrine:resolve-target-entity>
<doctrine:resolve-target-entity interface="Acme\InvoiceBundle\Model\InvoiceSubjectInterface">AppBundle\Entity\Customer</doctrine:resolve-target-entity>
</doctrine:orm>
</doctrine:config>
</container>
Expand All @@ -144,7 +144,7 @@ about the replacement:
'orm' => array(
// ...
'resolve_target_entities' => array(
'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'Acme\AppBundle\Entity\Customer',
'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'AppBundle\Entity\Customer',
),
),
));
Expand Down
0