This file contains hidden or 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 | |
header('Content-type: image/png'); | |
$mapa_base = imagecreatefrompng('/var/www/html/assets/images/a.png'); | |
$rio_negro = imagecreatefrompng('/var/www/html/assets/images/b.png'); | |
$bsas = imagecreatefrompng('/var/www/html/assets/images/c.png'); | |
$cordoba = imagecreatefrompng('/var/www/html/assets/images/d.png'); | |
imagealphablending($mapa_base, TRUE); |
This file contains hidden or 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
# Mis alias | |
# Respetar los drupal coding standarts | |
alias drupalcs="phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml" | |
# Mejorar el log de git | |
alias glog='git log --graph -50 --oneline' | |
# Descomprimir tar gz con "untar" | |
alias untar='tar -xvzf' | |
# copy output | |
alias copy="| xclip -selection clipboard" |
This file contains hidden or 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 | |
// In mymodule.module : | |
use Drupal\node\Entity\NodeType; | |
use \Drupal\Core\Entity\EntityInterface; | |
use \Drupal\Core\Entity\Display\EntityViewDisplayInterface; | |
/** |
This file contains hidden or 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 | |
require_once './vendor/autoload.php'; | |
// install phpword with composer: | |
// composer require phpoffice/phpword | |
use PhpOffice\PhpWord\Style\Language; | |
use PhpOffice\PhpWord\PhpWord; | |
use PhpOffice\PhpWord\Shared\Html; |
This file contains hidden or 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 | |
namespace Drupal\tester\Form; | |
use Drupal\Core\Form\ConfigFormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\State\State; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
use Drupal\Core\Messenger\MessengerInterface; |
This file contains hidden or 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
use Drupal\node\Entity\NodeType; | |
// Code ... | |
$node_types = NodeType::loadMultiple(); | |
// If you need to display them in a drop down. | |
$options = []; // options are stored in this variable | |
foreach ($node_types as $node_type) { | |
// Get a list of site content types to use as options in a dropdown menu in Drupal 9. |