Skip to content

Instantly share code, notes, and snippets.

View abutler3's full-sized avatar

Andrew Butler abutler3

  • Solider of Fortune, Member of The A Team, nephew of B.A. Baracus
  • Nashville, TN
View GitHub Profile
https://acquia-academy.gitbooks.io/study-guide-drupal-8-site-builder-exam/content/study-guide.html
http://www.tanay.co.in/blog/cracking-acquia-certified-drupal-site-builder-certification.html
https://www.4sitestudios.com/blog/when-to-use-content-types-taxonomies-and-custom-entities-in-drupal
What are blocks?
- https://www.drupal.org/docs/8/core/modules/block/overview
- https://www.drupal.org/docs/user_guide/en/block-concept.html
- Blocks are individual pieces of your site’s web page layout.
// is this a photo stored in the site (for a Person node)?
// if so, we can use Image Styles to generate the different sizes needed
if(strpos($photo_uri,"public:") === 0){
$regular = image_style_url($preset,$photo_uri);
$retina = image_style_url($preset . "_2x",$photo_uri);
$img_properties = image_get_info(image_style_path($preset, $photo_uri ));
$photo_height = $img_properties['height'];
$photo_width = $img_properties['width'];
} else {
// We have to explicitly specify the dimensions for photos coming from the photo services feed
Given an array of integers, can you find the sum of its elements?
Input Format
The first line contains an integer, , denoting the size of the array.
The second line contains space-separated integers representing the array's elements.
Output Format
Print the sum of the array's elements as a single integer.
// If variable is an array
// If array has all numbers