Released today, Drupal 10 represents a new milestone in the evolution of the CMS. Following Drupal 9, this version focuses on modernizing the stack, improving the developer experience, and removing deprecated code.
Released today, Drupal 9 builds directly on Drupal 8. Unlike previous major versions, this release does not introduce a major technical shift, but rather a controlled and incremental evolution.
Released today, Drupal 8 marks a major milestone in the evolution of the CMS. This new version introduces a deep architectural overhaul and adopts modern standards, bringing Drupal closer to contemporary PHP frameworks.
Displaying a date field may seem trivial in a Twig template in Drupal 8, but it is sometimes desirable to want to control the rendering of this field. Here are three ways to display Date fields in a Twig template.
The widget sfWidgetFormDoctrineChoice accepts option 'table_method', where you can define a method that returns a query, a collection of objects or a single object. This allows you to customize the results of our widget.
However, the problem is that it is impossible to pass parameters to this method, which may be necessary. One solution is to create a custom widget that accept parameters to it.
Here's a snippet, which allows you to select only one column in a query, and access to the result in symfony.
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(objectPeer::COUNTRY);
$c->setDistinct();
$res = objectPeer::doSelectStmt($c);
while ($row = $res->fetch()) {
$country = $row[0];
}
?>
Works with Propel 1.4 and symfony 1.3/1.4.