
In short, to customise and meet our dynamic requirements which may not be supported by config entity type definition as a part of @ConfigEntityType annotations in core or contributed modules, we need to override existing config entity types and write some custom code :).
Entity types use object based annotation unlike array based annotation which is commonly used. Also, Unlike Content Entity Types where every thing is a field, NOTHING is a field for Configuration Entity type.
Every Drupal config entity type is defined as a particular ConfigEntityType Annotation. Entity controller is completely different from the Controller of MVC pattern. To avoid this confusion in terminology Entity Controllers are termed as handlers, each form related to a particular entity type say taxonomy_vocabulary is declared inside handlers with form key.
In this article, will take an example of adding custom form elements to config entity type forms to explain this.
In case we need to add a custom element to any of these forms, we need to follow these 2 steps:
where, id = configEntityType id, form_type eg: default, reset, delete etc is whichever form we want to override and MyModuleForm is the Class name of new form we'll define in Step II.
Here is the sample code of overriding default form of taxonomy vocabulary.
{this is optional, we need to do this to keep the new class name same as base class i.e VocabularyForm}.
OR simply,
This override is important because we need to inherit functions and form elements defined in the parent class i.e VocabularyForm and also add additional feature i.e form element without disturbing the core code. This is purely OOPs concept of inheritance.
Config Entities have by default "getThirdPartySetting()" function { Config entities inherit this function if these extend ConfigEntityBase class which implements ConfigEntityInterface interface which in turn extends ThirdPartySettingsInterface interface}. This thirdParty function allows to set and retrieve a value particularly for a module.
else :
and of course inherit the parent save function.
Any Configuration Entity Type (Date format etc) can be overridden similarly, this can be extended to list_builder, access etc. Apart from overriding, we can also add new flavours of entity controller using the above steps.

To explore the RESTful nature of Drupal 8, we will need to enable the following modules:
Every entity in D8 is a resource, which has an end point. Since, its RESTful, the same end-point is used for CRUD (Create, Read, Update, Delete) operations with different HTTP verbs. Postman is an excellent tool to explore / test RESTful services. Drupal 8 allows you to selectively choose & enable a REST API. e.g., we can choose to expose only nodes via a REST API & not other entities like users, taxonomy, comments etc.
After enabling REST_UI module we can see list of all RESTful resources at /admin/config/services/rest. In addition to ability to choose the entity one can enable, we can also choose the authentication method per resource & enable specific CRUD operations per resource.

Let us take a look at what the REST APIs for User entity would be after we save the configuration in the above screenshot.
POST
Header
Note: Drupal 8 doesn't allow anonymous user to send a POST on user resource. It is already fixed in 8.3.x branch but for now we can pass the credentials of the user who have permission to create users. If you are interested in taking a deeper look at the issue, you can follow https://www.drupal.org/node/2291055.
Response: You will get a user object with "200 OK" response code
PATCH
Note: Now as user have permission to update his own profile so we can pass current user's credentials in authentication header.
Response: You will get "204 No Content" in response code.
GET
Response: You will get a user object with "200 OK" response code.
DELETE
Response: You will get "204 No Content" in response code.
Drupal 8 also allows us to export views as a REST service. It allows you to use all the available authentication mechanism in views itself.
JSON API module provides a new format called "api_json" which is soon becoming the de-facto standard for Javascript Frontend frameworks, If you plan to use completely de-coupled Drupal with frontend framework like Angular / React / Ember then its worth a look. To read more about JSON API you can visit the site.This article assumes you are familiar with what RESTful is & what do we mean when we use the term REST API. Some of you might have already worked with RESTful Web Services module in D7, it exposes all entity types as web services using REST architecture. Drupal 8 out of the box is RESTful with core support. All entities (provided by core + ones created using Entity API) are RESTful resources.

One of the popular Growth hacking technique for e-commerce and SaaS businesses is Referrals, which is to leverage your user's network to get new users by offering incentives / discounts. On a recent e-commerce project we had the requirement to create a complete referral system but couldn't find a module that came close to fulfilling the requirements, hence we developed and contributed Commerce Referral Discount. This module allows us to provide a discount credit to an existing user for referring new users. Discounts can be configured for both the referring user and the new user who joins as part of the referral. Lets see a typical flow:

Module Configuration:


Commerce Referral Discount module provide "Invite/Referral Link" block, which contains unique refer/invite link for authenticated users to share across their friends.
The module also integrates with views:

The flavour of this month has been the Drupalcon New Orleans and we decided to keep the momentum going for this PDG meet-up held at the QED42 office.
The first session was given by Rakhi Mandhania on her experience at DrupalCon both as an attendee as well as a Keynote speaker for the Higher Ed Summit. She explained how everyone is concerned with the migration of a large number of websites to Drupal 8 and the lack of rich Drupal talent. DrupalCAP initiative was hailed as a solution to the jarring lack of Drupal literate work force and appreciated all around.

The second session was by Piyuesh Kumar on service workers, the same session both he and Saket kumar presented at New Orleans. He explained that functionalities such as, rich offline experiences, periodic background syncs, push notifications that traditionally require a native application are coming to the web and service workers provides the technical foundation all these features will rely on.
He ended the session with a demo of a working website for DrupalCamp.

The evening was concluded with us deciding the dates for DrupalCamp Pune 2016, which will tentatively take place sometime in late August.
Watch this space for details, coming shortly!
Good day and see you all soon.

The monthly Pune Drupal Group Meetup for April was hosted by QED42. The second PDG meetup to take place in the month of April, You would assume meeting this often would get tiring for other people but not us! We Drupalers love a good catchup session.
The first session was kicked off by Prashant and Rahul, Interns at QED42 and they spoke on, "Our experience with Drupal." They explained about their journey as new comers to Drupal, from the lenses of both CMS and the community. Their confusion at the beginning, the new tech and softwares they have learned, their experience at Drupalcon Asia and their love for the community. A really enjoyable session peppered with ernest observations and cute cat pictures and a brilliant first time attempt. Bravo boys!
The second session was taken by Arjun Kumar of QED42 on,"Introduction to CMI." With a brief on CMI and the difference from the features land, he concluded with a demo.

After a short discussion on the probable date and location for Pune Drupal Camp we broke off for BOF sessions,with Navneet leading the discussion on Acquia certifications and further discussions on CMI.

With 20 people in attendence we concluded the PDG april meetup with delicious Pahadi Sandwiches in our tummy. Have a great weekend and see you soon!

The monthly meet-up for March was moved from the last friday of the month, which was the good Friday, to the 1st of April and hoped really hard that people didn't think it was an April fools prank. This PDG meetup was hosted by Rotary International thanks to diligence of Dipak Yadav who works there. It is always fun when the meetup is hosted in different locations because we get to explore different parts of Pune and see new faces.
With 25 members in attendence, the meetup was kicked off by Dipak giving us an informative talk about Rotary International and the work they do.

The speaker for the evening was Sushil Hanwate of Axelerant and he spoke on,“ Services and dependency injections in Drupal 8.”

The session ended after a short Q&A, we broke off into smaller groups for BOF sessions. Saket headed the BOF for Service workers and the second group discussed about the Drupal 8 Module development.
Once we were done with technical talks, we were served one of the best Kachoris we have tasted :). While we happily munched on the snacks, we decided on the preliminary team members for the upcoming Pune Drupal Camp.
Though the meetups are being held regularly we still need to figure a way of involving newer members into the community and one of the way that is possible is if we get more people volunteering to host the meetups. Kudos to Rotary for hosting us, if you are a Pune based company / group who would like to host the next meetup then please get in touch via comments.
Our next PDG meetup is scheduled for the 29th of April. Along with a session on,"Experience with Drupal" by Rahul Savaria and Prashant Kumar from QED42, we shall also be planning and discussing further about the upcoming Pune Drupal Camp.
Dont forget to RSVP, See you soon!

E-commerce has become a way of life for most of us and with so many ecommerce portals competing it becomes important to attract new customers to your site.
A way to attract the new customers is by incentivising their first purchase. E.g. Providing a discount, taking off the shipping charges, providing an extra product for free, etc.
In a recent commerce project we had a this requirement to find out if the purchase being made is the user's first. Searching for a solution online, I came across this sandbox module. The module needed to be published on drupal.org with a little cleanup (code structure and coding standards) [1] [2]. It was promoted to full project : Commerce First Time Customer Discount.
The module provides a couple of ways to identify if the purchase being made by the customer is his/her first:
Commerce First time Customer Discount can be easily integrated with the Commerce Discount module to check if the purchase is the user’s first. Follow the steps given below to implement it:
Your new offer will be now applied to the first purchase that a customer makes. Using commerce discount also enables you to set a date during which this offer will be applicable.
Commerce First Time Customer Discount module provides a rule condition to check if this is the first purchase made by the customer. Follow the steps given below to implement discount using the rules module:

With around 767 submissions from around the globe DrupalCon New Orleans must have set a new record for an all time high for session submissions at any conference. We can only imagine the plight of track chairs who helped select final ~150 sessions, given the numbers we are absolutely thrilled to announce that three of our talks (Including one in higher ed summit) have been accepted for Drupalcon New Orleans.
Here is a brief of talks at Drupalcon New Orleans May, 2016.
Saket and Piyuesh will talk about Service Workers on D8 and the promise of offline web. The topic is a build up from series of BoF at Drupalcon Asia where service workers was discussed passionately and pragmatically. It’s not just frontend, necessary backend infrastructure (route caching, url config) needs to be present for service workers to be a reality, hence Saket and Piyuesh ( our frontend and backend leads ) decided to team up on this. You can read more about the tentative agenda at the session synopsis and here are rumours of what to expect in the demo:
Saket is back with a session on the utopia of using Drupal 8 as a backend for multiple front end frameworks; this time it’s through Polymer. Webcomponents have had the frontend community wanting, what’s not to desire? Reusable components, shadow DOM, templating and much more all native to the browser. Though webcomponents paints a beautiful feature, Polymer from Google delivers it as a polyfill for the restless. In this talk Saket will talk about what Drupal 8 frontend programming might look like and glitches we might need to resolve for a smooth future.
Drupal Campus Ambassador Program - A community Initiative:
A wildcard entry into Dries’s keynote and Holly’s closing-note at Drupalcon Asia, DCAP made its humble beginnings in one of India’s regional events, where business folks were trying to find answers to Drupal talent problems. In spirit of Drupal community’s do-ocracy some of the community members figured a WIN-WIN solution for the problem, that is to take Drupal to colleges and evangelise it professionally. There have been numerous college workshops but DCAP is different in ways that it provides longevity and support to college students and that is exactly what Rakhi will be sharing at Higher-ed summit -- a bit of the history, successes so far and brave new world Drupal will foray into through DCAP. Catch Rakhi in action on May 9 at DrupalCon New Orleans.

To say that we are excited for Drupalcon Asia would be an understatement. With 36 of QED42 team in attendance, there is nothing we at QED42 love more than a congregation of Drupal lovers and Drupal enthusiasts from all over the world under one roof. We have been busy as elves trying to make it as much fun as possible for everyone (and us).
QED42 Sessions at Drupalcons
Art of Debugging and optimising Front End using Chrome Dev Tools: If you have always wanted to know tips,tricks and pointers on front end debugging and optimisation our QED42 guys, Swastik and Saket have you covered. Catch their talk on 02/19/2016 at 16:00 in hall 31, Drupalcon Asia.
Outsource! Really difficult to do it, eh?: Taking her experience as a Project Manager here at QED42, Rakhi Mandhania is giving a talk on outsourcing projects and how to optimize the process. Catch her in action at Drupalcon Asia, on 02/20/2016 from16:00-17:00 in hall 21.
BOFS Proposed by QED42
Bigpipe in Drupal 8: A Birds of a feather by Piyuesh where he will be discussing in detail about pipelining page components with the new Bagpipe Module, including code walk throughs. Take part in it at DrupalCon Asia at 12:45pm-13:45pm on Feb 19, 2016, Seminar Room 12.
Exploring Drupal 8 Frontend landscape through Polymer: Saket is back with a BOF session on the promise of using Drupal 8 as a backend for multiple front end frameworks.He will be concentrating on both about Drupal 8 Front end improvements and web components / Polymer. Come along and volley ideas to and fro with Saket at Drupalcon Asia on Feb 20 at from16:00 to17:00 in Seminar Room 13.
All work and no play makes for a dull Druplar, so come by Booth 11 for some fun activities.
See you soon!

Open source contributions are one of the key performance indicators at QED42, be it contributing code or participating in various community initiatives; from Developers to Project managers we expect everyone to be active contributors to the communities they interact with. For most of QED42 that translates to (but not limited to) contributing code to Drupal core or contrib and early this year we decided to reward and highlight contributions of one outstanding contributor every 3 months.
Today I'm proud to announce our first Featured Contributor of the series - Purushotam Kumar, a 2015 college passout Purshotam or PK as we affectionately call him is a ball of energy in office. Of sharp wit and mopey head of hair, his passion for work shines through his personality. To paraphrase Shakespeare, Though he be little, he is fierce.

Other than being an ace member on client projects, PK has done a tremendous job in getting acquainted with Drupal community and contributing back to it in short span of time. Like most contributors, he started his journey by contributing a module that he custom builf for one of the client projects and after getting git vetted access on 7th Oct, 2015 -- he hasn't looked back. He has contributed to 10+ projects on drupal.org and feels he is just getting started.
Check out Drupalcon Asia edition of QED42 Times to learn more about his motivations and future plans.

Drush is a shell and command line interface for drupal where in you can do 90% of the routine tasks quicker; whether you are maintaining or developing a site. Drush is such an indispensable tool that you can really break down your developer experience in two ages: BD (before Drush) and AD (After Drush). If you were lured by a module in BD age, the drill was something like:
This experience often made me feel like a click zombie and my development environment and methodologies as a den of time suckage. Really there are more sadistic drills in the drupal verse when you talk about BD. Then came drush, messiah for the click zombies who wanted to mend and do more and they did find happily ever after. The above drill is achieved in 2 steps in AD:
All this at the coziness of your terminal, above is one scenario among many time sucking and boring routines. Drush can do much more, it can empty your cache, it can update your site from command line, it can do releases and hundred other things. So much thanks to Arto, Moshe Weitzman, Owen Barton, Adrian Rossouw, greg.1.anderson and other drush contributors for making drush and liberating thousands of click zombies whose life otherwise would have been a lot less productive.

Its probably a moot point to suggest that social networking sites are the rage these days. Thanks to the success of facebook, twitter, myspace and orkut, most of the sites now have a strong social component to them. So is the social networking space overcrowded? Maybe, but dont let that discourage you. As we pointed out in a previous blog post there's still a lot of scope here. So what makes a social networking site successful ? What are the key components and features that a social networking site should have. We at qed42 are web dwellers and continuously trying to deconstruct the web and we have the answer for you. The essential elements which you should keep in mind while building a social networking site.
1. A navigation menu which lets the user access all the elements of the site of which he is a part of.
2. Layouts should be consistent. Header and footer should take no more than 30% of your real estate, if possible may be even less. User should be able to see the content in any resolution. If its not so you may end up in a situation that if the user is at a low resolution, the header occupies 50% of the page and he may need to scroll multiple times.
3. Logo should be the identity of your site and it must be clickable!
These are some of the few things which we believe are the ingredients of a successful social networking site. Did we miss out on anything? Let us know in comments or contact us.

Kaal is a port of a wordpress theme to drupal. A pro-blogger theme which can have "ads" in the blog. It is a three column theme which you can use for your blog. It uses Blueprint CSS framework. This is a sub theme of drupal's blueprint project. So please download and install the blueprint base theme (follow the install instructions for installing blueprint as base theme) if you chose to install kaal as sub theme. We have also provided an option to download it as a standalone theme.

Features
It has been tested for browser compatibility and it works fine in most of the widely used browsers. You can download the theme here
This is the first official theme release of QED42, we would be releasing more themes in future and all under GPL. Would love to hear your feedback in comments and suggestions for future theme releases.

A snippet from a DHH talk on entrepreneurship at Stanford where he emphasises that instead of trying to outspend your competition in advertising, to build a sustainable business you should rather build an audience by educating about your product and your company. A DHH Jewel. You can watch the entire talk here.

For web developers, the choice of a source code editor isn't one made lightly. If you are going to be coding on a daily basis, and thus productivity is gained or lost here on a grand scale.
But my search for the best code editor stopped with Sublime Text. In the course of the article, I'm going to do my level best to persuade you to switch to Sublime Text 2. For those of you who have already made this smart choice, jump straight to part 2 of this article where we will endeavour to set up the best practices on Sublime Text so that you can have a perfect workflow.
Let me first list out the reasons to switch to Sublime Text 2 if you haven't already -:
I hope you are convinced already, but if you aren't, read on, as we indulge in the best practices for Sublime Text.
Perfection with Sublime Text - Part 2
In this article we have discussed installing a super-package manager, Sublime shortcuts, code snippets, various libraries at your disposal, and so much more.
By the end of that article, I know you will be like this -: Jumping in happiness.gif

Coming from a Rails background, which is almost built to cater to services and REST API, Drupal was always gonna be tough when it came to services. Our hands were tied, as we knew we had to use Drupal because of the the advantages it offered far outweighed the disadvantages, so we put on a brave face and marched on to tackle services.
In a nutshell, Web Services make it possible for external applications to interact with our application (in this case our Drupal site). These interactions are most commonly reading, creating, updating, and deleting resources. REST is one of the most popular ways of making Web Services work and is the Drupal standard. Making use of these CRUD options is considered making it RESTful. Popular usage of a REST interface is a mobile application that needs to read and write data from your site's database.
There are plenty of tutorials across the web to get you kickstarted on setting up services, and we found this to be relatively easy. One of the best tutorials, I found on the web which spurred me on the way was http://pingv.com/blog/an-introduction-drupal-7-restful-services.
The major problem, I will deal within this tutorial is creating a custom POST driven service, where we will tackle CSRF Token, Cookies etc.
At the end of the article, I will also be sharing quick tips on working with UUID and integrating it with Services.
Custom POST Service, using cookies and CSRF Token
Submitting a custom form from an external site (or mobile application) to your site. You have services setup in for the site, but can't handle this custom post request. Here are a list of things which needs to happen:
Assuming external site is in Drupal, but it really could be anything. If it's a mobile app, it would obviously be something else....This is just so that you get a idea, and can follow. You can execute the code in another local drupal site using devel execute php so that you have an exact idea of what you need to achieve.
In a system config form, 4 variables are saved -: services_username, services_password, services_url, services_endpoint
a) Retreive session cookie
b) Retrieve CSRF token
c) Sending data to the site
d) Receiving data at the server
As promised few quick tips when integrating services with UUID.
a) By default the services module, will give you an index of 20 terms when you do /service-endpoint/node. On this view, you only get basic details of the node, language, title, author, uid etc. What you don't get is custom fields like body, tag, category etc. To see the detailed node view, go /service-endpoint/node/nid where nid is the node nid. As promised few quick tips when integrating services with UUID.
But the catch is this no longer works with UUID. Then on, you have to do /service-endpoint/node/uuid. This applies to everything, /service-endpoint/user/uuid
b) With UUID enabled, CREATE based methods will no longer be accepted. You instead have to do a PUT call on service-endpoint/node/uuid which will create the content if it doesn't exist. In the params, you need to pre-generate a UUID, and pass it in the PUT call, for content to be created with that UUID. Sucks, doesn't it? That's why we resorted to custom calls in our website, rather doing PUT for node creation
Bonus : UUID is not even unique!!! Yes, Universal Unique Identifier does not guarantee unique values. It's the biggest veil ever. If you see the install file in UUID module, uuid.install, you will see in table alterations it adds a 36 character field to many tables, but doesn't add the condition for it to be unique. The explanation is that the chances of having a 36 character being same in a table is 1/36! which is really rare, and its not worth the overhead to check if its unique. Interesting, isn't it?. :-)
With Services, now being integrated into the Drupal Core for D8, it is only going to gain traction in popularity and downloads.. Quoting the founder of Drupal, Dries Buytaert, the future is a RESTFUL Drupal.

Devel is one of the most powerful modules in Drupal, and it's one of the first modules I end up installing as a developer.
One of the less prominent features of Devel, is the Devel Execute PHP Code, which is available on your site as /devel/php. It provides a text area for entering your PHP code into. Any output (print, print_r, var_dump) is shown in a drupal_set_message.
I often use this interface to experiment with code, run one time scripts, and debug existing functions. Yes, within this block, all drupal functions, and any functions you write on your site can be executed. But it comes with it's fair share of difficulties, and the biggest stumbling block for me, was the lack of a syntax highlighter. There were silly errors you make, which takes forever to debug, and time is always of the essence.
But all this forever changed, when PHP Execute Extended Tools came to my world. This sandbox module is available athttps://drupal.org/sandbox/DizzyC/1905296 and will change the way you thing about Devel Execute PHP. Quoting from the horse's mouth , PHP Execute Extended Tools is meant to be an extension to Devel's PHP Execute PHP page (/devel/php), and is compatible with Drupal 7.

PHP X Tools adds a History section to the devel execute page as well as a Saved Script section. It keeps a history off all scripts executed on the devel/php page so you can rerun or review them at any time. It also adds the ability to save and load custom scripts so you can keep a collection of scripts that you want to be able to load and rerun at any time. (Can be some testing scripts, i
Optionally it integrates with the 'CodeMirror' library (http://codemirror.net/) transforming the plain textarea into a lightweight code editor supporting syntax highlighting, code formatting, code folding, matching brackets, search and replace and some more.
To be honest, it's this optional integration which gives it all it's fanciness so it's highly recommended. Instructions to install are clearly mentioned in the sandbox project link, and will only take minutes for you to get started.
Code away, and now the semicolon or apostrophe that you forgot, will no longer come back to bite you in the ass.
Happy Coding!!!

For Linux
Linux 32-bit -:
Linux 64-bit -:
Customizing on Linux - Desktop Entry and Symbolic Link
Linux Users should do the following to take advantage of Sublime Text by doing the next steps -:
For Mac Users, after downloading Sublime Text, all you will need is to create a symlink so that you can use sublime from the terminal
The last command will open a file called sublime.desktop in sublime, where you need to paste the following
For Mac OSX
Users should download the latest package from here -: Sublime Text 2 - Download Open the .dmg file, and then drag the Sublime Text 2 bundle into the Applications folder.
For Windows
Users should download the latest package from here depending on your operating system (32 or 64 bit) -: Sublime Text 2 - Download. Doubleclick on the installer and follow the onscreen instructions.
Mac and Window Users, if you have further queries check this doc out -: Sublime Text Install Doc
Now this is the basic step. But to be super efficient, this is nowhere enough.
Open Sublime Text Editor. Go to View -> Show Console
On Sublime Text 3, now paste the following code in the console
On Sublime Text 2, paste this code in the console
What does this awesome package manager for you? It basically makes package installations a breeze
We can use Sublime’s command palette by accessing the Tools menu, or by pressing Shift + Command + P, on the Mac or Ctrl + Shift + P for Linux and Windows Users. Whether you need to visit a Preferences page, or paste in a snippet, all of that can be accomplished here. It also opens up a list of commands available to the user. Any library that you install will immediately add new commands here.
SUPER + SHIFT + P (SUPER = CMD on mac or CTRL on other operating systems) In the dialogue that pops up, type pi followed by the Enter/Return key to select Package Control: Install Package Now type the package install shortcut listed and hit the Enter/Return key again
So click Ctrl + Shift + P, and Type in install, which fuzzy searching enables the closest option Package Control : Install Package.
Now through this you can directly install the libraries you need just by searching for what you need.
But some of these will need extra configuration. Do note that all these have to go in Preferences->Package Settings -> Select Package -> User Settings . Anything saved in Default Settings will be reset.
where USERNAME is your github username
OR
Log into github
Account Settings -> Applications ""Create New Token"" under ""Personal API Access Tokens"" You might want to give the Token a useful name
Edit the settings file (it should open automatically the first time you use a Gist command done through Ctrl + Shift + P) to specify token.
You must enter your GitHub token here
Nowdays I am working in Drupal, so I have shown these settings for Drupal Coding standards. A quick Google Search will give you Sublime Text 2 settings for Ruby on Rails, Wordpress, Java or any other language you may be working on. Lets set the encoding, tab size, ruler line, etc right now so that our code will meet the Drupal Coding standards. Paste the following between the squigly brackets in "Settings - User" which you can access from the Preferences menu, you need to add a comma between this and any existing rules but make sure there isn't a comma on the last line: