To be able to use PHP5 PDO with MS Access mdb files the following is required
(the same applies for the PHP4 style of using odbc_X
except for the
obviously PDO specific requirements):
In Linux this is achieved by intalling the php5-odbc
package:
<?php | |
/** | |
* @file | |
* Contains \Drupal\mymodule\Plugin\QueueWorker\MyModuleTaskWorkerEntityUpdate. | |
*/ | |
namespace Drupal\mymodule\Plugin\QueueWorker; | |
use Drupal\Core\Queue\QueueWorkerBase; |
<?php | |
/** | |
* @file | |
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlock. | |
*/ | |
namespace Drupal\mymodule\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; |
<?php | |
/** | |
* @file | |
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlockByURI. | |
*/ | |
namespace Drupal\mymodule\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; |
<?php | |
/** | |
* @file | |
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlockResponsive. | |
*/ | |
namespace Drupal\mymodule\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; |
<?php | |
$errors = array(); | |
$validate = $entity->validate(); | |
$violations = $validate->getIterator(); | |
foreach ($violations as $violation) { | |
$constraint = get_class($violation->getConstraint()); | |
$type = $constraint; | |
$msg = $violation->getMessageTemplate(); | |
if ($constraint == 'Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint') { |
<?php | |
use Drupal\node\Entity\Node; | |
$current_language = \Drupal::languageManager()->getCurrentLanguage(); | |
$default_pages = \Drupal::state()->get('my_module.default_pages', array()); | |
$node_id = (isset($default_pages['front_' . $current_language->getId()]) ? $default_pages['front_' . $current_language->getId()] : NULL); | |
if (!$node_id) { | |
return NULL; | |
} |
To be able to use PHP5 PDO with MS Access mdb files the following is required
(the same applies for the PHP4 style of using odbc_X
except for the
obviously PDO specific requirements):
In Linux this is achieved by intalling the php5-odbc
package:
#!/bin/sh | |
url="https://ftp.drupal.org/files/projects/drupal-7.58.zip"; | |
if curl --output /dev/null --silent --head --fail "$url"; then | |
echo "URL exists: $url"; | |
else | |
echo "URL does not exist: $url"; | |
fi; | |
url="https://ftp.drupal.org/files/projects/drupal-8.5.1.zip"; |