Warning: The magic method RestrictCategories::__wakeup() must have public visibility in /var/www/html/blog/wp-content/plugins/restrict-categories/restrict-categories.php on line 59

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: get_comment(): Argument #1 ($comment) must be passed by reference, value given in /var/www/html/blog/wp-includes/class-wp-query.php on line 3084

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blog/wp-content/plugins/restrict-categories/restrict-categories.php:59) in /var/www/html/blog/wp-includes/feed-rss2-comments.php on line 8
Comments on: List all entity classes managed by Doctrine in Symfony2 controller https://abendstille.at/blog/?p=163 the blog of ma Sun, 05 Oct 2014 20:57:23 +0000 hourly 1 https://wordpress.org/?v=5.4.15 By: Israel https://abendstille.at/blog/?p=163&cpage=1#comment-186 Sun, 05 Oct 2014 20:57:23 +0000 http://www.abendstille.at/blog/?p=163#comment-186 Sorry, copy-paste error, that should be:

$doctrineTables[] = $m->getTableName();

]]>
By: Israel https://abendstille.at/blog/?p=163&cpage=1#comment-185 Sun, 05 Oct 2014 20:46:35 +0000 http://www.abendstille.at/blog/?p=163#comment-185 I found this incredibly useful for getting all table names handled by doctrine – just change your method to getTableName() – which can be compared to all existing tables, like so:

$em = $this->getDoctrine()->getManager();

$doctrineTables = array();
$allTables = array();

$meta = $em->getMetadataFactory()->getAllMetadata();
foreach ($meta as $m) {
$doctrineTables[] = $m->getName();
}

$tables = $em->getConnection()->getSchemaManager()->listTables();
foreach ($tables as $table) {
$allTables[] = $table->getName();
}

Thanks for the post!

]]>
By: Andrew https://abendstille.at/blog/?p=163&cpage=1#comment-181 Wed, 25 Jun 2014 08:44:22 +0000 http://www.abendstille.at/blog/?p=163#comment-181 This is dognail, not solution.
$entityClassNames =
$entityManager
->getConfiguration()
->getMetadataDriverImpl()
->getAllClassNames();

]]>
By: Jimmy Ko https://abendstille.at/blog/?p=163&cpage=1#comment-179 Fri, 02 May 2014 07:24:43 +0000 http://www.abendstille.at/blog/?p=163#comment-179 It nice and really save my time.

]]>
By: Daan Biesterbos https://abendstille.at/blog/?p=163&cpage=1#comment-176 Sun, 02 Mar 2014 13:32:55 +0000 http://www.abendstille.at/blog/?p=163#comment-176 To get entities for one bundle in particular, you can do:

$manager = new DisconnectedMetadataFactory($this->getContainer()->get(‘doctrine’));
$bundle = $this->getKernel()->getBundle($bundleName);
$metadata = $manager->getBundleMetadata($bundle);

]]>
By: ma https://abendstille.at/blog/?p=163&cpage=1#comment-160 Tue, 01 Oct 2013 02:03:25 +0000 http://www.abendstille.at/blog/?p=163#comment-160 @Don , this depends on how your routes are defined.

if by path you mean the namespace it could get you problems if you strip it off. if you reduced the class to its simple name e.g. by array_pop(explode(‘\\’, $m->getName())) you might have naming conflicts and your routes might not be identified correctly.

however this is not true if you are sure you are only using entities from one namespace.

post the code how you plan to create the links to your route on http://pastebin.com/ and i might be able to help!

]]>
By: Don https://abendstille.at/blog/?p=163&cpage=1#comment-159 Mon, 30 Sep 2013 18:06:11 +0000 http://www.abendstille.at/blog/?p=163#comment-159 thanx, this was very useful,… have a question thought, this displays a complete path to the entities, how would i make it display one word that links to a my own route,..

]]>