mgiagnoni / lyraadminbundle Goto Github PK
View Code? Open in Web Editor NEWSymfony2 admin bundle. Provides an easily configurable backend area, powered by jQuery and jQuery UI widgets, to create, edit, delete, show, search Doctrine objects.
Symfony2 admin bundle. Provides an easily configurable backend area, powered by jQuery and jQuery UI widgets, to create, edit, delete, show, search Doctrine objects.
Thanks for this bundle, great work.
I'm trying to make it work in Sf. 2.1 beta, but i can't.
The exception:
InvalidDefinitionException: ->addDefaultsIfNotSet() is not applicable to prototype nodes at path "lyra_admin.actions"
When we have the support to Symfony 2.1 ?
Regards.
The problems is simple. I don't know when, but someone change the path to the Session class(from Symfony\Component\HttpFoundation\Session\Session to Symfony\Component\HttpFoundation\Session), and now the class UserState(located Lyra\AdminBundle\UserState) throws error(here : public function __construct(Session $session, ). Can you check it.
first, the url is ok : http://localhost/Symfony/web/app_dev.php/admin/comp/list
then change the config.yml
lyra_admin:
models:
comp:
route_pattern_prefix: backend
then, clear cache and vist url :http://localhost/Symfony/web/app_dev.php/admin/backend/comp/list
get errors:
No route found for "GET /admin/backend/comp/list"
404 Not Found - NotFoundHttpException
hi
how to disable new / delete / batch actions in some of grid ( the button is hidden and logic is disabled ).
thanks
Bundle currently only works when entities are mapped by the default entity manager.
If you have the following configuration:
# app/config/config.yml
doctrine:
dbal:
default_connection: default
connections:
default:
driver: %database_driver%
host: %database_host%
dbname: database1_name
user: database1_user
password: database1_password
charset: UTF8
other:
driver: %database_driver%
host: %database_host%
dbname: database2_name
user: database2_user
password: database2_password
charset: UTF8
orm:
auto_generate_proxy_classes: %kernel.debug%
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
AcmeClassifiedsBundle: {type: annotation}
other:
connection: other
mappings:
AcmeBlogBundle: {type: annotation}
# ... #
lyra_admin:
models:
listing:
class: 'Acme\ClassifiedsBundle\Entity\Listing'
# ... #
post:
class: 'Acme\BlogBundle\Entity\Post'
# ... #
The entity mapped by other
entity manager will give an error
MappingException: Class Acme\BlogBundle\Entity\Post is not a valid entity or mapped super class.
I have just installed the LyraAdminBundle. Unlike most admin bundles I tried (they promise a lot of things but give you a hard time getting a fraction of it to work properly) I got almost everything working properly.
Thank you for your great job !
I think there is problem with pagination. The query counter does not handle the 'order by' properly. It issues a count but does not ignore the 'order by', which resultats in an SQL error (in Postgresql at least)
Is LyraAdminBundle still developed?
how to edit the user and multi-select the groups ?
groups = new \Doctrine\Common\Collections\ArrayCollection(); } ``` } /*\* @entity */ class Group { // ... } CREATE TABLE User ( id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id) ) ENGINE = InnoDB; CREATE TABLE users_groups ( user_id INT NOT NULL, group_id INT NOT NULL, PRIMARY KEY(user_id, group_id) ) ENGINE = InnoDB; CREATE TABLE Group ( id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id) ) ENGINE = InnoDB; ALTER TABLE users_groups ADD FOREIGN KEY (user_id) REFERENCES User(id); ALTER TABLE users_groups ADD FOREIGN KEY (group_id) REFERENCES Group(id);Classic example is Post one-to-many Comment, or Product one-to-many ProductOption.
I am in the Post list panel, I select a post to edit, and I go to the edit post panel. Now I want an easy way to add comments to this post, see all comments for this post, etc. (list/sort/filter them), and generally manage them.
If I didn't have a child admin, I'd have to go to the comments list panel and filter by post. To add a comment to a post, I'd have to add a new comment, select the post from a dropdown and save.
The advantage of a child admin is I don't have to go to the Comments panel and filter by post.name to see all comments for the Post, I can see that by clicking a link on the Post panel.
But more importantly, to add a comment to my post, I click Comments ( a link on the Post edit screen). This shows me the comments for my post only. Then I click add to add a new comment. When I save, it is automatically added to my post.
Hello.
It's something small, but in Grid/column.php in function getValue(), I got a notice error because $value was not initialized. It blocked everything to display.
public function getValue($object)
{
$value = null;
foreach ($this->methods as $method) {
$value = $object->$method();
if (!is_object($value)) {
break;
}
$object = $value;
}
if ($this->formatFunction) {
$value = call_user_func($this->formatFunction, $value, $this->format, $object);
} else if(null !== $value && $this->format) {
if ('date' == $this->type || 'datetime' == $this->type) {
$value = $value->format($this->format);
} else {
$value = sprintf($this->format, $value);
}
}
return $value;
}
As you can see, I initialized $value to prevent the notice to happen in the elseif statement.
Not much else to say
Pierre
Hi, I get an error running the next command on the latest Sf2 version:
php composer.phar update lyra/admin-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for lyra/admin-bundle dev-master -> satisfiable by ly
ra/admin-bundle dev-master.
- Conclusion: remove doctrine/orm 2.3.x-dev
- lyra/admin-bundle dev-master requires doctrine/orm 2.2.* -> satisfiable by
doctrine/orm 2.2.x-dev, doctrine/orm 2.2.3, doctrine/orm 2.2.2, doctrine/orm 2.
2.1, doctrine/orm 2.2.0, doctrine/orm 2.2.0-BETA2, doctrine/orm 2.2.0-RC1, doctr
ine/orm 2.2.0-BETA1.
- Can only install one of: doctrine/orm 2.3.x-dev, doctrine/orm 2.2.x-dev.
- Can only install one of: doctrine/orm 2.2.3, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.2, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.1, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.0, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.0-BETA2, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.0-RC1, doctrine/orm 2.3.x-dev.
- Can only install one of: doctrine/orm 2.2.0-BETA1, doctrine/orm 2.3.x-dev.
- Installation request for doctrine/orm == 2.3.9999999.9999999-dev -> satisf
iable by doctrine/orm 2.3.x-dev.
Regards.
Hey!
I've just updated to dev-master and have a problem with edit and new actions:
Variable "renderer" does not exist in LyraAdminBundle:Form:form.html.twig at line 3
I'm on Symfony 2.1
Could you please help with this issue?
My config:
lyra_admin:
models:
categories:
class: 'Aaa\MyBundle\Entity\Category'
list:
title: Category
columns:
name: ~
slug: ~
form:
groups:
listing:
caption: Caption
fields: [name, slug, prize_min]
Is it possible to restrict based on roles:
who can see which columns/fields?
who can perform which actions?
who can see which entity screens?
This is more a feature request.
I have some models that are going to have only one record, so it'll be easy for the administrator just to click on the navigation link and to start edit the record(i want to skip the part of showing him the list view, made him click on edit to start edit the record).
So maybe you can create some setting for custom URL/URI or just to check if the result is one record to edit it automatically.
Thank you for the great work you've done. This module is great.
Hi.
I want to limit rows per page, is it possible?
and how to Validating the fileld in new or update form?
thanks
hi
1.how to add dropdown list widget to form
2.how to fiter grid using combo box( dropdown list)
3.how to filter grid using special value( which field does not showed in grid )
4.how to upload/show image in form
thanks a lot.
hi,
Fatal error: Call to a member function format() on a non-object in D:\www\Symfony\vendor\bundles\Lyra\AdminBundle\Renderer\ShowRenderer.php on line 50
When a field with type datetime and contains null value, then cell in the gird will show :
Fatal error: Call to a member function format() on a non-object in D:\www\Symfony\vendor\bundles\Lyra\AdminBundle\Renderer\ListRenderer.php on line 151
Hello.
In my invitation class, I have a relation oneToOne to user. (if someone register using the invitation token).
But, even if I'm puting user in the list of field to display, I get no result.(blank column).
Any Idea why ?
Pierre
I get this error when rendering edit form for some models:
Key "created_at" in object (with ArrayAccess) of type "Symfony\Component\Form\FormView" does not exist in LyraAdminBundle:Form:form.html.twig at line 28
I think this has something to do with the tag attribute generated in LyraAdminExtension for all fields and the fact that the field name is not same as the uncamelized name used as tagname.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.