Capgemini
Sri Sattva Group Interview Questions and Answers
Q1. MySQL types of Joins, Delete vs TRUNCATE
MySQL types of Joins, Delete vs TRUNCATE
Types of Joins in MySQL: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN
DELETE statement removes specific rows from a table based on a condition
TRUNCATE statement removes all rows from a table without logging individual row deletions
Q2. What is abstract class
An abstract class is a class that cannot be instantiated and is used as a base for other classes to inherit from.
Cannot be instantiated on its own
May contain abstract methods that must be implemented by child classes
Can have both abstract and non-abstract methods
Q3. What is T function
T function is used in Drupal to translate text strings into the current language of the website.
T function is used to translate text strings in Drupal.
It is used to ensure that text displayed on the website is in the correct language.
Developers can use the T function in their code to make it multilingual.
Example: t('Hello world') will translate 'Hello world' into the current language of the website.
Q4. Types of Drupal entity
Types of Drupal entities include nodes, users, taxonomy terms, and custom entities.
Nodes: Basic content type in Drupal, can represent articles, pages, etc.
Users: Represents individuals who can log in and interact with the site.
Taxonomy terms: Used for categorizing content.
Custom entities: Entities created by developers for specific needs.
Q5. Various types of Git commands
Git commands include add, commit, push, pull, merge, branch, checkout, and clone.
git add - stages changes for commit
git commit - records changes to the repository
git push - uploads local changes to a remote repository
git pull - downloads changes from a remote repository
git merge - combines changes from different branches
git branch - lists, creates, or deletes branches
git checkout - switches branches or restores files
git clone - creates a copy of a repository
Q6. Event subscriber example
Event subscriber example in Drupal development
Event subscribers allow modules to subscribe to and respond to events triggered by the Drupal core or other modules
Event subscribers are defined in a module's services.yml file
Example: Creating an event subscriber to log user login events
Q7. Debug error in production env
To debug errors in production environment, follow these steps
Check error logs for specific error messages
Use debugging tools like Xdebug or Drupal's built-in debugging features
Review recent code changes that may have caused the error
Test the code on a local environment to replicate the issue
Consult with team members or online forums for assistance
Q8. Custom form methods
Custom form methods in Drupal allow developers to create and manipulate forms in unique ways.
Custom form methods can be used to alter form elements, validate form submissions, and process form data.
Examples include using hook_form_alter to modify existing forms, implementing custom form validation functions, and creating custom submit handlers.
Custom form methods can also be used to create entirely new forms from scratch.
These methods provide flexibility and customization opt...read more
More about working at Capgemini
Reviews
Interviews
Salaries
Users/Month