public function __toString() {
return $this->getTitle() ? (string)$this->getTitle() : '';
}
For extend or replace templates (or another types of resource files) you just have to create a folder in app/Resources with the name of the bundle, from which you want to extend the template, and put the new file inside a folder called ‘view’ following the same structure that it has in the vendor. For example for login.html.twig located in vendor/Sonata-project/user-bundle/resources/views/security/login.html.twig, you have to put it in app/Resources/SonataUserBundle/security/login.html.twig
{# app/resources/SonataBlockBundle/views/Block/ block_side_menu_template.html.twig #} | |
{# Fixed changing this : #} | |
{%- if item.current %} | |
{%- set classes = classes|merge([options.currentClass]) %} | |
{%- elseif item.currentAncestor %} | |
{%- set classes = classes|merge([options.ancestorClass]) %} | |
{%- endif %} |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
- Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any
*nix
based command prompt (but not the default Windows Command Prompt!) - Type
cd ~/.ssh
. This will take you to the root directory for Git (LikelyC:\Users\[YOUR-USER-NAME]\.ssh\
on Windows) - Within the
.ssh
folder, there should be these two files:id_rsa
andid_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Typels
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be namedid_rsa
andid_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default. - To create the SSH keys, type
ssh-keygen -t rsa -C "your_email@example.com"
. Th
First configure ACL permissions correctly:
https://sonata-project.org/bundles/admin/master/doc/reference/security.html
Remember these 3 things explained in the link:
- Install the ACL tables: php app/console init:acl
- If you have Admin classes, you can install or update the related CRUD ACL rules (I HAD PROBLEMS NOT EXECUTING THIS ONE, REMEMBER TO RUN IT):
DateTime picker in sonata admin forms
->add('fecha', 'sonata_type_datetime_picker', array('label' => 'Fecha', 'format'=> 'dd/MM/yyyy hh:mm',
'dp_side_by_side' => true,
'dp_use_current' => false,
'dp_use_seconds' => false,))
Android part:
http://programmerguru.com/android-tutorial/how-to-upload-image-to-php-server/
Symfony controller:
public function uploadimageAction(Request $request)
Add app:elevation="0dp" to appbarlayout as shown below:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/AppTheme.AppBarOverlay"
app:elevation="0dp">