Closed manuelkleinert closed 6 years ago
I need categories from the Pimcore objects. Unfortunately I don't have access to the class category.
AppBundle\LuceneSearch\Services\Categories
public function getCategories() : array { $categoryArray = []; array_push($categoryArray, ['id' => 1, 'label' => 'Blog']); array_push($categoryArray, ['id' => 2, 'label' => 'Support']); array_push($categoryArray, ['id' => 3, 'label' => 'Project']); $catList = new DataObject\....\Listing(); // -> ERROR (Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function get() on null in /var/www/html/pimcore/lib/Pimcore/Db.php on line 51) foreach ($catList as $cat) { array_push($categoryArray, ['id' => $cat->getId(), 'label' => $cat->getName()]); } return $categoryArray; }
hey @manuelkleinert fixed in 2.0.2!
Thank you very much @solverat
I need categories from the Pimcore objects. Unfortunately I don't have access to the class category.
AppBundle\LuceneSearch\Services\Categories