GSoC 2017 | Week 1: Port Vote Up/Down

This is my weekly blog post update on the progress of my GSoC project: Port Vote Up/Down. The coding period started one week ago on 30th May. As described in my previous post, I will be working with marvil07 and Palashvijay4O this summer. 

Agenda for the week

The agenda for the Week 1 was to create the configuration for the module. There already existed a dev version of the module on d.o. which had the basic configuration but I and my mentors decided that I must repeat this step on my own at least once so that I could know how the configuration management system works. I did the following things in order to get the base version of the module from scratch:

  • Creating the basic configuration.


    In this part, I created and configured the .yml files.
    • .info.yml
      This file contains basic info about the module like module name, description, core version, package type and dependencies.
    • .menu.yml
      This file configures the module's listing under the Configuration tab in Administration. 
    • .routing.yml
      This file describes the parent of the configuration of the module, permissions, and namespace of the module. 
  • Creating the main module system file.


    This file has an extension .module . This is the main file containing PHP code which contains all the code for the module.
  • Creating Form settings and configuration


    Forms are necessary components of a module. They are the module's basic settings. This part included creation of the files /config/install/<module name>.<module settings path>.yml(Contains default values for the form) and /src/form/<module settings path>.php(Renders the form in configuration settings)

Project progress

By the end of this week, the directory structure looks like this:

project directory structure

I have hit the first and the easiest milestone of the project i.e. basic configuration. And the Configuration page looks like this:

Configuration Settings

The code written so far could be found here

Agenda for next week

The agenda for the next week is to port the widgets to Drupal 8. In, Drupal 7 widgets were displayed using Chaos Tools but in Drupal 8, we have Plugin API which I will utilize to display the various kinds of voting widgets.