Explain public, private, protected functions and variables inside a class in PHP
Explain public, private, protected functions and variables inside a class in PHP.
I'll define a variable as a property
How do you ensure the new field requiring a change apply in the next deployment?
Assuming there is a new field requiring a change on a content type. How do you ensure the changes apply in the next deployment?
There are a couple of ways to achieve this... depending on whether a custom module exists or not. I'll focus on using Drush.
If you find a bug in a Drupal contributed module, what approach do you take to fix it?
Replicate
Replicate the bug in your local environment.
Check
Check - do you have the latest version of the contrib module? In case the issue has already been identified and resolved.
A quick check of the issue list for the contrib module.
Nothing.
A couple of approaches to build a homepage or landing page through Drupal
2 or 3 approaches to build a homepage or landing page through Drupal
Please include any limitations & considerations of each approach
Building a homepage a few options to consider and should against a business case:
1. Article
An article – create a new node (assuming a least one content type exists), then using Basic Site Settings (admin > config > system), scroll down to Front Page and enter the node.nid value or alias.
A brief explanation how Drupal cache works... Include the different modules provided by Drupal to manage cache
Drupal cache is one of the major subsystems that deliver Drupal's flexibility for devs. In a nutshell, Drupal cache is about speeding up the time to render a page to a user. Vanish or similar pending server-side set-up makes caching more efficient.
Drupal modules - to name a few Internal Dynamic Page Cache, Internal Page Cache, System
What the following git commands do...
git reset, git revert, and git cherry-pick are three Git commands used for different purposes related to managing your version control history. Here's a brief overview of each command:
git reset
git revert
git cherry-pick
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
error: package android.support.v4.content does not exist
Android Studio error
error: package android.support.v4.content does not exist
This is a problem with plugins using old Android support dependencies instead of the AndroidX equivalent. As it's a dependency issue, to resolve add jetifier. I know yet another package...
Build failed error: cannot find symbol Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
Android Studio build errors
Build failed error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
or
cannot find symbol Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
To resolve - upgrade the compileSdkVersion and targetSdkVersion to 31 in your grade file. Note, this setting could be in one of the following files
Ionic - Capacitor config
Initialise your Capacitor config
To initialise Capacitor use the CLI questionnaire:
npx cap init
On executing the above command, you will be prompted to answer a few questions for your app such as your app's name and the package ID.