This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function NOMBRE_DEL_TEMA_alpha_preprocess_html(&$variables) { | |
if ( isset($variables) ) { | |
if(arg(0)=='node' && is_numeric(arg(1))) { | |
$node = menu_get_object(); | |
if ( isset( $node->field_section['und'][0]['tid'] ) ) | |
$taxonomy_term = $node->field_section['und'][0]['tid']; | |
if ( isset( $node->field_section['es'][0]['tid'] ) ) | |
$taxonomy_term = $node->field_section['es'][0]['tid']; | |
if ( isset($taxonomy_term) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-User entity: | |
/** | |
* Owning Side | |
* | |
* @ORM\ManyToMany(targetEntity="Company\MyBundle\Entity\Team", inversedBy="users") | |
* @ORM\JoinTable(name="user_team", | |
* joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, | |
* inverseJoinColumns={@JoinColumn(name="team_id", referencedColumnName="id")} | |
* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* css */ | |
.modal.fade.in { | |
display:block; | |
top: 0; | |
right: 0; | |
position: fixed; | |
bottom: 0; | |
left: auto; | |
max-height: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# twig template #} | |
<div class="flash-messages"> | |
{% block flashes %} | |
{% for notice_level in ['success','error','info', 'warning', 'notice'] %} | |
{% if app.session.hasFlash(notice_level) %} | |
<div class="alert alert-{{ notice_level }}"> | |
<a class="close" data-dismiss="alert" href="#">x</a> | |
<h4 class="alert-heading">{{ notice_level }}</h4> | |
{{ app.session.flash(notice_level) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- edit.html.twig --> | |
<form action="{{ path('project_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}> | |
<input type="hidden" name="_method" value="PUT" /> | |
{{ form_widget(edit_form) }} | |
<p> | |
<button type="submit" class="btn btn-primary">Edit</button> | |
</p> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Edits an existing Project entity. | |
* | |
* @Route("/{id}", name="project_update") | |
* @Method("PUT") | |
* @Template("ProjectBundle:Project:edit.html.twig") | |
*/ | |
public function updateAction(Request $request, $id) | |
{ | |
$em = $this->getDoctrine()->getManager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header('Content-Type: text/xml'); | |
require_once __DIR__.'/../goutte.phar'; | |
include __DIR__."/../include/FeedTypes.php"; | |
use Goutte\Client; | |
$client = new Client(); | |
$crawler = $client->request('GET', 'http://apps.cbp.gov/bwt/'); | |
$locations = array ( "CalexicoEast", "CalexicoWest" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Official page | |
http://twitter.github.com/bootstrap/ | |
-Plugins/Addons | |
--DatePicker | |
https://github.com/eternicode/bootstrap-datepicker | |
--TimePicker | |
https://github.com/jdewit/bootstrap-timepicker | |
--ColorPicker | |
http://www.eyecon.ro/bootstrap-colorpicker/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
hist = log --graph --pretty=format:'%C(yellow)%h%Creset -%C(green)%d%Creset %s %C(cyan)(%cr) %C(magenta)<%an>%Creset' --abbrev-commit --date=relative | |
ff = flow feature | |
ffs = flow feature start | |
ffc = flow feature checkout | |
fff = flow feature finish -r | |
st = status | |
ci = commit | |
br = branch | |
co = checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$data = array( | |
'bundles' => array( | |
'article' => (object) array( | |
'type' => 'article', | |
'name' => 'Article', | |
'base' => 'node_content', | |
'module' => 'node', | |
'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.', | |
'help' => '', | |
'has_title' => '1', |
OlderNewer