You searched for symfony

  1. PHP News You May Have Missed - October / November 2014

    ), you’ll be up and authing in no time. Ever wanted to make single sign-on a possibility for your apps? Now you can. Symfony Symfony has been on fire for the past few months - what with their developer experience initiative aimed at making Symfony more approachable to newcomers and the flurry
  2. 9 reasons to consider eZ Publish CMS for your next web project

    Introduction With the recent refactoring of eZ Publish content management system as a full stack Symfony application it should be interesting for a broader PHP public to consider it as a content management solution. We at Netgen have been using it for almost a decade and would like to share our
  3. Use Laravel Contracts to Build a Laravel 5 Twig Package

    template engine called Blade. However, I want to use Symfony Twig as my template engine. Blade already offers the possibility to register your own extensions; check the Twig Bridge for more info. Laravel 5 has a better way to achieve the same goal using Contracts, so let’s create our own
  4. Image Scraping with Symfony's DomCrawler

    ; } setFileName provides an option to change the name of the ZIP file with a default name set to zipImages: public function setFileName($name = "zipImages") { $this->fileName = $name; } At this point, we instantiate the Symfony crawler component to search for images, then download and save all
  5. A First Look at OroCRM and Extending with Bundles

    gain the favor of your correspondent. OroCRM Though the CRM field of the PHP world isn’t madly ripe, the recent flurry of developments from Oro had my interest piqued enough to make me take a look. OroCRM is a multi-language CRM built on PHP 5.4+ with the Symfony framework. It’s a behemoth
  6. Autogenerate CRUD Apps with Phreeze

    Back in the times of Symfony 1.x, the framework had a powerful backend module to help the developers and site administrators create a good enough app and provide necessary CRUD features to manage the database (and save us from using PHPMyAdmin). Since Symfony 2, this has been taken out from
  7. Building a Drupal 8 Module: Blocks and Forms

    In the first installment of this article series on Drupal 8 module development we started with the basics. We’ve seen what files were needed to let Drupal know about our module, how the routing process works and how to create menu links programatically as configuration.

    In this tutorial we are going to go a bit further with our sandbox module found in this repository and look at two new important pieces of functionality: blocks and forms. To this end, we will create a custom block that returns some configurable text. After that, we will create a simple form used to print out user submitted values to the screen.

    Drupal 8 blocks

    A cool new change to the block API in D8 has been a switch to making blocks more prominent, by making them plugins (a brand new concept). What this means is that they are reusable pieces of functionality (under the hood) as you can now create a block in the UI and reuse it across the site - you are no longer limited to using a block only one time.

    Let’s go ahead and create a simple block type that prints to the screen Hello World! by default. All we need to work with is one class file located in the src/Plugin/Block folder of our module’s root directory. Let’s call our new block type DemoBlock, and naturally it needs to reside in a file called DemoBlock.php. Inside this file, we can start with the following:

    <?php
    
    namespace Drupal\demo\Plugin\Block;
    
    use Drupal\block\BlockBase;
    use Drupal\Core\Session\AccountInterface;
    
    /**
     * Provides a 'Demo' block.
     *
     * @Block(
     *   id = "demo_block",
     *   admin_label = @Translation("Demo block"),
     * )
     */
    
    class DemoBlock extends BlockBase {
    
      /**
       * {@inheritdoc}
       */
      public function build() {    
        return array(
          '#markup' => $this->t('Hello World!'),
        );
      }
    
      /**
       * {@inheritdoc}
       */
      public function access(AccountInterface $account) {
        return $account->hasPermission('access content');
      }  
    
    }

    Like with all other class files we start by namespacing our class. Then we use the BlockBase class so that we can extend it, as well as the AccountInterface class so that we can get access to the currently logged in user. Then follows something you definitely have not seen in Drupal 7: annotations.

  8. Announcing PHP Summer Camp

    slideshows, attendees go home from PSC with new, practical, usable knowledge that can be applied immediately, because they then have actual hands on experience with everything the speakers talked about. The Summer Camp mostly focuses on Symfony in general, but it uses it to present cutting edge PHP
  9. Top 10 Z-Ray Features to Check Out

    environments such as AWS. Zend Server supports any PHP code, and provides deep insight into that code, including popular PHP applications and frameworks like WordPress, Magento, Drupal, Zend Framework, Symfony, and Laravel. See this overview for more information on what Zend Server is and how
  10. First Look at Platform.sh - a Development and Deployment SaaS

    for their Drupal eCommerce solutions. Initially, the service only supported Drupal based hosting and deployment, but it has rapidly added support for Symfony, Wordpress, Zend and ‘pure’ PHP, with node.js, Python and Ruby coming soon. It follows the microservice architecture concept and offers an increasing
  11. Building a Drupal 8 Module - Config and the Service Container

    we’ll need to use that class. Next, we need to also use the Symfony 2 ContainerInterface as a requirement of the create() method that instantiates another object of our controller class and passes to it the services we want. Finally, we’ll need a constructor to get the passed service objects
  12. Exploring the Webiny Framework: The StdLib Component

    -component of the framework. It’s kind of like adding a dependency or two to a random PHP project and before you know what’s happening, Symfony/Yaml is somehow already in there. Among other things, StdLib, like many others before it, makes dealing with scalars significantly simpler by adding a fluent
  13. Supercharge Continuous Delivery in Jenkins with Workflow

    ' } In the above script, we first define our URL for the Git repository. Within the current node, we pull in this Git repository and run composer install while we set the Symfony environment to production. Next we run Bower to install our front-end dependencies. If we were to run this script
  14. Grumpy Programmer's Testing Bundle: Review

    by the anti-pattern plagued ZF2, and Symfony has changed its architecture completely since then). In the outro, Chris says “I know there is a lot of stuff in this guide for you to consider.” but … there really isn’t. Books as outdated as this should be rewritten completely, their old content
  15. Introducing CockpitCMS - a CMS for Developers

    to inspect the inner structure of a variable so that we can easily locate the correct members to be used. NOTE: VarDumper can be used in Silex too, as well as in any other framework or non-framework app. For a detailed introduction on this new tool from Symfony, please take a look at Bruno’s article
  16. 7 More Mistakes Commonly Made by PHP Developers

    a good URL rewriting guide that would cover every server and framework out there, almost every framework has a guide on how to set up clean URLs (Laravel, Phalcon, Symfony, Zend) and any that don’t just aren’t worth using - they obviously don’t care about modern practices. 4. Suppressing errors
  17. Visualize Your Code's Quality with PhpMetrics

    require 'halleck45/phpmetrics' Fetching the Code We’ll test PhpMetrics on two code-heavy projects: Laravel and Symfony, in framework, not project form. That means we won’t be using the create-project command from Composer, but the bare source of each framework. git clone https
  18. PHP Tips, Resources and Best Practices for 2015

    Packages Almost two years ago, Fabien Potencier of Symfony fame announced the creation of a list of vulnerable packages for PHP. A year and a half later, this became standard part of Symfony and was turned into open source public domain property. You could now post your composer.lock file
  19. SitePoint PHP in 2015: Future Plans

    authors join the team. Nicolas Scolari, France Nicolas is a back-end developer from France specialized in PHP and currently actively experimenting with Symfony 2. He’s already produced two posts for us - one explaining Symfony’s route annotations and the other dealing with Traits in a Doctrine
  20. PHPSummerCamp Review

    , the audience. Well done to all, both speakers and organizers! Day 1 Symfony Basics On day one, I joined a Symfony basics workshop by Ryan Weaver. An absolutely excellent veteran speaker from KNP Labs, Ryan conquered the room with his enthusiasm, energy and positive reinforcement