background preloader

Documentation - Twig - The flexible, fast, and secure PHP template engine

Documentation - Twig - The flexible, fast, and secure PHP template engine
Related:  acyian

FilePermissionsACLs POSIX Access Control Lists (ACLs) are more fine-grained access rights for files and directories. An ACL consists of entries specifying access permissions on an associated object. ACLs can be configured per user, per group or via the effective rights mask. These permissions apply to an individual user or a group, and use the same as rwx found in regular permissions. For an explanation of rwx, see FilePermissions Before beginning to work with ACLs the file system must be mounted with ACLs turned on. 0) It may be necessary to install acl utilities from the repositories. $ sudo apt-get install acl 1) Add the option acl to the partition(s) on which you want to enable ACL in /etc/fstab. ... 2) If necessary, remount partition(s) on which ACLs were enabled for them to take effect. $ sudo mount -o remount /home 3) Verify that ACLs are enabled on the partition(s): $ mount | grep acl ACL entries consist of a user (u), group (g), other (o) and an effective rights mask (m). Listing ACLs

The View After reading the first part of this tutorial, you have decided that Symfony2 was worth another 10 minutes. In this second part, you will learn more about Twig, the fast, flexible, and secure template engine for PHP. Twig makes your templates more readable and concise; it also makes them more friendly for web designers. Getting familiar with Twig The official Twig documentation is the best resource to learn everything about this new template engine. A Twig template is a text file that can generate any type of content (HTML, CSS, JavaScript, XML, CSV, LaTeX, ...). Below is a minimal template that illustrates a few basics, using two variables page_title and navigation, which would be passed into the template: To render a template in Symfony, use the render method from within a controller and pass the variables needed as an array using the optional second argument: Variables passed to a template can be strings, arrays, or even objects. Decorating Templates Final Thoughts

Iconic: Advanced icons for the modern web by Waybury Want to dig right in? Check out our examples: Whether you know it or not, you've probably seen Iconic. It's in use on thousands of websites, many of which you likely use everyday. We want to make Iconic even better by increasing the number of beautifully designed icons in the set as well as applying forward-thinking approaches to how icons are built, used and displayed. Iconic is much more than just icons. 200+ beautiful icons—each designed at three individual sizesThe collection comes in PNG, SVG, WebP and font formats.A subset of icons which respond/adjust to data—we call these Smart Icons.Well-structured semantic SVG; allowing you to easily style and adjust your icons similarly to how you'd adjust HTML. That's a lot to take in, so let's dig in to the details. Just because an image is scalable doesn't mean it's legible at all sizes. We want Iconic to act as a catalyst for new display techniques on the web. Here are some of the ideas and techniques we've been exploring for development:

Finance &Amp; Banking Icons Set. Stock Vector 125973296 All Images Refine Your Search Save to a Lightbox ▼ Please Login... To organize photos in lightboxes you must first register or login. Find Similar Images Share ▼ Finance & banking icons set. Stock Vector Illustration: Image ID: 125973296 Release Information: N/A Copyright: VoodooDot Vector Format This image is a vector illustration and can be scaled to any size without loss of resolution. Download Same Artist | See All Similar Images | See All Keywords icon, bank, banking, money, cash, budget, atm, vector, coin, stack, credit, bag, payment, pay, set, check, safe, wealth, convert, card, isolated, insert, business, pay card, money bag, symbol, clip art, graphic, finance, stock, dollar, stock market, black, trading, building, graph, diamond, web, currency, briefcase, pin code, investment, commerce, pictogram, phone, salary, financial, hand, businessman, exchange View Images by Category 36,913,863 royalty-free stock images / 268,041 new stock images added this week How do you like this page? Not Registered?

Packagist Symfony2 + PHPCR + Doctrine2 + Jackalope recipe Lately I’ve followed some developments in the Symfony2 corner of the PHP community with great interest. One of the most enticing developments is the usage of a Content Repository as a backend for your CMS. There is some work being done on the Symfony CMF, combining Symfony2, Doctrine2, PHPCR and Jackalope into a set of tools for building CMS’es based on a Content Repository backend. I didn’t get anything of the CMF to run yet, so I decided to dive in to tying these separate techniques together myself, and get a little proof-of-concept working. Here’s the code, and here’s the recipe: I do not intend to convince you to use a content repository. 1. I chose Apache Jackrabbit, a Java Content Repository (JCR), to do this. This will run jackrabbit at port 8080. 2. I’m assuming you know how to do this. 3. Go to your vendor dir and clone the PHPCR libraries from github: 4. Open app/autoload.php and configure the namespaces for the downloaded libraries: <? 5. <? 6. 7. 8. <? <? 9. <? 10. <? 11. 12. <? 13.

La nouvelle solution mobile de Wix Nous sommes fiers de vous annoncer le lancement de notre nouvelle solution mobile. Désormais, vous pouvez automatiquement optimiser votre site pour les smartphones et tablettes en un clic. Bien évidemment, il vous est possible de personnaliser son design à volonté – sans pour autant modifier son rendu sur les ordinateurs. Profitez d’une liberté totale de customisation et offrez à vos visiteurs une expérience d’utilisation mobile unique. Pourquoi et comment optimiser votre présence sur l’Internet mobile? 40% des Français sont connectés sur le Web mobile, il est par conséquent essentiel de présenter un site mobile optimisé. Dans l’Éditeur Wix, il vous suffit de suivre les instructions ci-dessous afin de créer votre site mobile personnalisé : Pour les amateurs de vidéos, voici un tutoriel explicatif sur notre éditeur mobile: Que faire si vous possédez déjà un site mobile ? Avoir une seule URL vous soulage également d’une bonne dose de travail. Devenez Mobile !

Banking Icons On Color Background. Vector Illustration. - 130438649 All Images Refine Your Search Save to a Lightbox ▼ Please Login... To organize photos in lightboxes you must first register or login. Find Similar Images Share ▼ Banking icons on color background. Stock Vector Illustration: Image ID: 130438649 Release Information: N/A Copyright: Vector Icon Vector Format This image is a vector illustration and can be scaled to any size without loss of resolution. Download Same Artist | See All Similar Images | See All Keywords bank, banking, gold, dollar, euro, web, payment, wallet, website, loan, pay, white, retail, business, vector, sign, deposit, safe, symbol, internet, graphic, finance, card, invoice, black, graph, illustration, www, chart, money, safety, currency, piggy, briefcase, calculator, set, invest, credit, investment, commerce, pictogram, credit card, hand, cash, bill, exchange View Images by Category 36,913,863 royalty-free stock images / 268,041 new stock images added this week How do you like this page? Not Registered? Create a Free Browse Account

Commencer à développer avec le framework symfony Le web est un environnement est en pleine mutation. De nombreuses technologies et outils font leur apparition et nous proposent tous les jours de plus en plus d'interactivités dans nos pages web (« Atlas », script.aculo.us, Adobe Integrated Runtime…). Toutes ces technologies transforment nos chers navigateurs en véritable plateformes. Cependant, on oublie souvent en voyant toutes ces technologies que l'évolution se situe aussi du côté du serveur. Le langage PHP lui aussi témoigne de ces profonds changements dans notre manière de développer. symfony n'est pas développé de zéro. La documentation sur ce framework est très aboutie, cependant, certains concepts peuvent être longs à acquérir. Lorsque l'on est développeur PHP, on a souvent l'habitude d'utiliser des scripts, des bibliothèques déjà existantes dans nos projets (et les includes sont légions en en-tête de nos scripts). symfony est utilisable de deux façons : II-A. Je vous propose également deux vestions prêtes à l'emploi : II-B.

text Field Type (current The text field represents the most basic input text field. These options inherit from the form type: max_length type: integer default: null If this option is not null, an attribute maxlength is added, which is used by some browsers to limit the amount of text in a field. This is just a browser validation, so data must still be validated server-side. empty_data type: mixed default: depends on other field options, see below This option determines what value the field will return when the submitted value is empty. The true default value of this option depends on other field options: If data_class is set and required is true, then new $data_class();If data_class is set and required is false, then null;If data_class is not set and compound is true, then array();If data_class is not set and compound is false, then '' (empty string). But you can customize this to your needs. required type: Boolean default: true If true, an HTML5 required attribute will be rendered. Note label TwigPHP label_attr data trim

Le top des ressources gratuites en Web design pour 2012 Magazine du Webdesign C'est à cette période de l'année que l'on voit apparaître des centaines d'articles sur le Web du type : Les 10 meilleurs [...] de 2012. 20% des ressources gratuites pour Web designers listées dans ces articles peuvent susciter un certain intérêt, les 80% restantes sont à jeter. En voici quelques-unes qui ne finiront pas à la corbeille. Web Interface Lab Une collection d’éléments d’interfaces utilisateur gratuits codés en HTML5 et CSS3. Pixabay : plus de 40,000 photos et illustrations gratuites En tant que Web designers, vous êtes constamment à la recherche d’illustrations et de photos. The Entypo Pictogram Suite Une collection gratuite de pictogrammes . Gemicon Encore une ressource gratuite d’icônes, cette fois-ci c’est 600 icônes gratuites à utiliser pour tous vos designs. Other Icons On continue avec les icônes. Wireframe.CC L’outil incontournable pour du wireframing rapide et facile. Google Web Fonts Font Fabric Un showcase de fonts gratuites. Subtle Patterns Premium Pixels Agile Designers

Retina Finder Window (PSD) Today’s freebie is a tasty morsel of a contribution from Thom, a 17 year old designer and front end developer from the Netherlands. A Mac finder window, retina style. Dark UI Kit (PSD) Today’s freebie is a rather tasty looking dark UI kit by Swedish designer Victor Erixon – his second contribution to Premium Pixels. iPhone Music Player (PSD) Today’s freebie, an iPhone Music Player, is a fantastic contribution from fellow Brit designer Danny Keane. Dark Search Box & Drop Down (PSD) Today’s freebie is a sweet contribution from French UI Designer Alexandre Naud. Blueish Cloud Growl Style Today’s freebie, a transparent Growl notification style, is a fantastic contribution from Swedish designer Victor Erixon. Shopping Cart Icons (PSD/PNG) Today’s freebies is a set of five 32px shopping cart icons I put together for practice. Mac OS Folder & File Icons (PSD) Today’s quick freebie is a couple of Mac OS style file and folder icons. World Map & Pin (PSD)

Learn symfony: a Beginner's Tutorial With the release of symfony 1.0, it’s time for those who haven’t tried it yet to see what’s inside this beautiful framework. Stable, fully documented, and released under the open-source MIT license, symfony is used by hundreds of web sites, including some very large ones (Yahoo! Bookmarks, with its 20 million-strong user base, is built with symfony). If you haven’t taken the time to look at the introductory screencasts on the symfony project website, this simple tutorial will lead you through the basics. The best way to learn and understand symfony is to use it, so this article will lead you through the creation of a photo album application with this framework. Symfony is a Model-View-Controller (MVC) framework written in PHP that’s aimed at building web applications. Not only is Symfony an MVC implementation in PHP, it also integrates a lot of objects that facilitate the development of web applications — and integrates them all with a coherent syntax. Initializing an Application <? <?

[Part 1] - Symfony2 設定與樣板 — symblog - A Symfony2 Tutorial 布局結構 由於 Twig 支援樣板繼承,我們接著使用 三階層繼承 方法,這個方法讓我們可以在應用程式中透過三個獨立的層次調整畫面,提供更多客製空間。 主要樣板 - 第 1 層 現在就開始建立我們 symblog 的基礎區塊階層樣板,在這裡需要兩種檔案,樣板與 CSS。 Note 在這個樣板引用了三個外部檔案, 1 個 JavaScript 與 2 個 CSS,這個 JavaScript 程式修正 IE 在 9 以前版本不支援 HTML5 的問題, 2 個 CSS 檔案匯入的字型是來自 Google Web font 。 這個樣板標示了我們部落格網站的主要結構,大部分的樣板由 HTML 組成,包含了少量的 Twig 指令,我們接著檢查這些 Twig 指令。 先將焦點放在文件的 HEAD 部份,從 title 開始看: <title>{% block title %}symblog{% endblock %} - symblog</title> 第一個會你會注意到的是奇怪的 {% 標籤,這不是 HTML ,更不會是 PHP ,這是 3 個 Twig 標籤中的一個,這個標籤是 Twig Do something 標籤,用來執行控制語法或是定義區塊元素的指令,完整的 控制結構 可以在 Twig 手冊看到。 在上面的例子中,我們延伸了應用程式的基礎樣板與前面定義的 title 區塊,你會注意到使用在 extends 中的樣板格式少了 Bundle 與 Controller 部份,記得樣板格式是 bundle:controller:template 。 Controller 部份,我們是指定使用應用程式層級的樣板,會放在 app/Resources/views/ 。 接著我們定義另外一個 title 區塊,並且放入一些內容,這裡是放入部落格的標題。 在樣式表區塊我們加入了下一個 Twig 標籤 {{ ,或是稱之為 Say something 標籤。 這個標籤是用來印出變數或描述的數值,在上面的例子會印出 asset 方法所傳回的數值,這提供了我們一個可攜式方法來連結應用 程式的資源,像是 CSS 、 JavaScript 與圖片。 {{ 標籤也可以搭配過濾器在輸出前處理內容。 {{ blog.created|date("d-m-Y") }} 完整的過濾器清單可以參考 Twig 手冊 。 軟體包樣板 - 第 2 層

Related: