<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8245480087941986974</id><updated>2026-10-15T19:31:33.888-07:00</updated><category term="C++"/><category term="Java"/><category term="Programming Skills"/><category term="C Program"/><category term="Data Structure"/><category term="Drupal"/><category term="Drupal 8"/><category term="Computer Graphics"/><category term="Security Tips"/><category term="UML Modeling"/><category term="PHP"/><category term="Opencart"/><category term="Electron"/><category term="Laravel"/><category term="Michael Jackson"/><category term="Node.js"/><category term="Actionscript 3.0"/><category term="CSS"/><category term="CURL"/><category term="Dependency Injection"/><category term="Git"/><category term="HTTPClient request"/><category term="Magento 2"/><category term="PL/SQL"/><category term="SMTP"/><category term="Sci-fi"/><category term="Wordpress"/><title type='text'>Code hookup</title><subtitle type='html'>hookup ur code with us</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>152</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-4360192100130753768</id><published>2024-07-02T11:52:00.000-07:00</published><updated>2024-07-02T11:52:24.292-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>Input button missing primary class name </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 class=&quot;container-12&quot; id=&quot;page-subtitle&quot;&gt;Input button missing btn-primary class name in bootstrap_barrio theme&lt;/h1&gt;&lt;div&gt;Solution:&amp;nbsp;&lt;/div&gt;&lt;div&gt;1. Goto Appearances &amp;gt; Settings&amp;nbsp;&lt;/div&gt;&lt;div&gt;2. Just Save the settings form without changing anything.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Article link:&amp;nbsp;https://www.drupal.org/project/bootstrap_barrio/issues/3332673&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/4360192100130753768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2024/07/input-button-missing-primary-class-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/4360192100130753768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/4360192100130753768'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2024/07/input-button-missing-primary-class-name.html' title='Input button missing primary class name '/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-6177710351556607907</id><published>2023-07-21T01:41:00.003-07:00</published><updated>2023-07-21T04:56:54.872-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><title type='text'>gnutls_handshake() failed GIT Clone [Solution]</title><content type='html'>&lt;p&gt;If you are facing error like &quot;curl 56 GnuTLS recv error&quot; while cloning a git repository, it is a &quot;gnutls_handshake()&quot; error.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Error: RPC failed; curl 56 GnuTLS recv error (-24): Decryption has failed&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Solution&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Rebuilding git with &lt;b&gt;openssl&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Follow the steps given below:&lt;/p&gt;&lt;p&gt;1. Install build-essential, fakeroot and dpkg-dev using the following command.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;sudo apt-get install build-essential fakeroot dpkg-dev&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2. Create a directory named git-rectify in the home folder using the following command.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;mkdir ~/git-rectify&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;3. CD in to the get-rectify directory and get the git source files.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;cd ~/git-rectify&lt;/pre&gt;&lt;pre class=&quot;prettyprint&quot;&gt;apt-get source git&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;4. Install all the git dependencies.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;sudo apt-get build-dep git&lt;/pre&gt;&lt;br /&gt;5. Install libcurl with all development files.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;sudo apt-get install libcurl4-openssl-dev&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;6. Unpack all the source packages using the following command.&lt;br /&gt;&lt;br /&gt;Note: The name “git_2.34.1-1ubuntu1.9” could vary based on the lastest version. So look in to the directory for the correct version name.&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;dpkg-source -x git_2.34.1-1ubuntu1.9&lt;/pre&gt;&lt;br /&gt;7. Cd in to “git_2.34.1” folder and open the control file located inside debian folder (git_2.34.1/debian/control) in a text editor. Replace all the occurences of “libcurl4-gnutls-dev” to “libcurl4-openssl-dev”. Also open “debian/rules” file and delete the line “TEST=test”&lt;br /&gt;&lt;br /&gt;8. Build the package files using the following command.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;sudo dpkg-buildpackage -rfakeroot -b&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;9. Install the new git package by executing the folling command.&lt;br /&gt;&lt;br /&gt;Note: The package name is based on the system architecture. So have a look at the package name located in “git_2.34.1” (could be a different name for you) folder.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;sudo dpkg -i git_2.34.1-1ubuntu1.9_amd64.deb&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/6177710351556607907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2023/07/gnutlshandshake-failed-git-clone.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/6177710351556607907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/6177710351556607907'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2023/07/gnutlshandshake-failed-git-clone.html' title='gnutls_handshake() failed GIT Clone [Solution]'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-7824954032015048458</id><published>2023-03-31T14:25:00.002-07:00</published><updated>2023-03-31T14:25:58.066-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>Get Plugin Id list of Blocks in Drupal</title><content type='html'>&lt;p&gt;&amp;nbsp;To obtain Plugin Id list of Blocks used in your Drupal website&lt;/p&gt;&lt;p&gt;Use this Drush command&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;drush ev &quot;print_r(array_keys(\Drupal::service(&#39;plugin.manager.block&#39;)-&amp;gt;getDefinitions()));&quot;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/7824954032015048458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2023/03/get-plugin-id-list-of-blocks-in-drupal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7824954032015048458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7824954032015048458'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2023/03/get-plugin-id-list-of-blocks-in-drupal.html' title='Get Plugin Id list of Blocks in Drupal'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-5403544258634364158</id><published>2020-11-09T09:29:00.002-08:00</published><updated>2020-11-09T09:29:24.388-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Main menu dropdown parent item clickable in Drupal 8 using Bootstrap 4</title><content type='html'>&lt;p&gt;&amp;nbsp;Edit menu--main.html.twig template file&lt;/p&gt;&lt;p&gt;{#&lt;/p&gt;&lt;p&gt;/**&lt;/p&gt;&lt;p&gt;&amp;nbsp;* @file&lt;/p&gt;&lt;p&gt;&amp;nbsp;* Bootstrap Barrio&#39;s override to display a menu.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&lt;/p&gt;&lt;p&gt;&amp;nbsp;* Available variables:&lt;/p&gt;&lt;p&gt;&amp;nbsp;* - menu_name: The machine name of the menu.&lt;/p&gt;&lt;p&gt;&amp;nbsp;* - items: A nested list of menu items. Each menu item contains:&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- attributes: HTML attributes for the menu item.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- below: The menu item child items.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- title: The menu link title.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- url: The menu link url, instance of \Drupal\Core\Url&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- localized_options: Menu link localized options.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- is_expanded: TRUE if the link has visible children within the current&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp;menu tree.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- is_collapsed: TRUE if the link has children within the current menu tree&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp;that are not currently visible.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;- in_active_trail: TRUE if the link is in the active trail.&lt;/p&gt;&lt;p&gt;&amp;nbsp;*/&lt;/p&gt;&lt;p&gt;#}&lt;/p&gt;&lt;p&gt;{% import _self as menus %}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;{#&lt;/p&gt;&lt;p&gt;&amp;nbsp; We call a macro which calls itself to render the full tree.&lt;/p&gt;&lt;p&gt;&amp;nbsp; @see http://twig.sensiolabs.org/doc/tags/macro.html&lt;/p&gt;&lt;p&gt;#}&lt;/p&gt;&lt;p&gt;{{ menus.menu_links(items, attributes, 0) }}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;{% macro menu_links(items, attributes, menu_level) %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; {% import _self as menus %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; {% if items %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {% if menu_level == 0 %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ul{{ attributes.addClass(&#39;nav navbar-nav&#39;) }}&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {% else %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ul class=&quot;dropdown-menu&quot;&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {% endif %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {% for item in items %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {%&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set classes = [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; menu_level ? &#39;dropdown-item&#39; : &#39;nav-item&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.is_expanded ? &#39;menu-item--expanded&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.is_collapsed ? &#39;menu-item--collapsed&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.in_active_trail ? &#39;active&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.below ? &#39;dropdown&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;li{{ item.attributes.addClass(classes) }}&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {%&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set link_classes = [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; not menu_level ? &#39;nav-link&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.in_active_trail ? &#39;active&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.below ? &#39;dropdown-toggle-none&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item.url.getOption(&#39;attributes&#39;).class ? item.url.getOption(&#39;attributes&#39;).class | join(&#39; &#39;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;nav-link-&#39; ~ item.url.toString() | clean_class,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {% if item.below %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{ link(item.title, item.url, {&#39;class&#39;: link_classes}) }}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;span class=&quot;dropdown-toggle&quot; data-toggle=&quot;dropdown&quot; role=&quot;button&quot; aria-haspopup=&quot;true&quot; aria-expanded=&quot;false&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{ menus.menu_links(item.below, attributes, menu_level + 1) }}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {% else %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{ link(item.title, item.url, {&#39;class&#39;: link_classes}) }}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {% endif %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/li&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {% endfor %}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/ul&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; {% endif %}&lt;/p&gt;&lt;p&gt;{% endmacro %}&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Javascript to handle multilevel dropdown menu items&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;$(&#39;.dropdown-menu span.dropdown-toggle&#39;).on(&#39;click&#39;, function(e) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; if (!$(this).next().hasClass(&#39;show&#39;)) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).parents(&#39;.dropdown-menu&#39;).first().find(&#39;.show&#39;).removeClass(&#39;show&#39;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; var $subMenu = $(this).next(&#39;.dropdown-menu&#39;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; $subMenu.toggleClass(&#39;show&#39;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; $(this).parents(&#39;li.nav-item.dropdown.show&#39;).on(&#39;hidden.bs.dropdown&#39;, function(e) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;.dropdown-submenu .show&#39;).removeClass(&#39;show&#39;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; return false;&lt;/div&gt;&lt;div&gt;&amp;nbsp; });&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CSS&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;.dropdown-toggle::after {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; content: &#39;\f078&#39;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-family: &quot;Font Awesome 5 Free&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-size: 20px;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right: 35px;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; position: absolute;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-weight: 600;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; border: none;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top: 10px;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/5403544258634364158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2020/11/main-menu-dropdown-parent-item.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/5403544258634364158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/5403544258634364158'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2020/11/main-menu-dropdown-parent-item.html' title='Main menu dropdown parent item clickable in Drupal 8 using Bootstrap 4'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-8373873721949487998</id><published>2019-10-22T19:48:00.000-07:00</published><updated>2019-10-22T19:48:02.153-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><title type='text'>Responsive CSS Breakpopints</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Desktops&lt;br /&gt;
&amp;nbsp; ##Screen = 1281px to higher resolution desktops&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 1281px) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Laptops, Desktops&lt;br /&gt;
&amp;nbsp; ##Screen = B/w 1025px to 1280px&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 1025px) and (max-width: 1280px) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Tablets, Ipads (portrait)&lt;br /&gt;
&amp;nbsp; ##Screen = B/w 768px to 1024px&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 768px) and (max-width: 1024px) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Tablets, Ipads (landscape)&lt;br /&gt;
&amp;nbsp; ##Screen = B/w 768px to 1024px&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Low Resolution Tablets, Mobiles (Landscape)&lt;br /&gt;
&amp;nbsp; ##Screen = B/w 481px to 767px&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 481px) and (max-width: 767px) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; ##Device = Most of the Smartphones Mobiles (Portrait)&lt;br /&gt;
&amp;nbsp; ##Screen = B/w 320px to 479px&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
@media (min-width: 320px) and (max-width: 480px) {&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp; //CSS&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/8373873721949487998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/10/responsive-css-breakpopints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8373873721949487998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8373873721949487998'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/10/responsive-css-breakpopints.html' title='Responsive CSS Breakpopints'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-4193370844389169591</id><published>2019-07-29T04:34:00.003-07:00</published><updated>2019-07-29T04:34:46.789-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Theme table with pager - Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
public function nodeList() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header = [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Nid&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Title&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $query = \Drupal::database()-&amp;gt;select(&#39;node&#39;, &#39;n&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $query-&amp;gt;fields(&#39;n&#39;, [&#39;nid&#39;]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $pager = $query-&amp;gt;extend(&#39;Drupal\Core\Database\Query\PagerSelectExtender&#39;)-&amp;gt;limit(10);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $results = $pager-&amp;gt;execute()-&amp;gt;fetchAll();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; foreach ($results as $key =&amp;gt; $result) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $node = Node::load($result-&amp;gt;nid);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $row = [];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $row = [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;nid&#39; =&amp;gt; $node-&amp;gt;id(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;title&#39; =&amp;gt; $node-&amp;gt;getTitle(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $rows[] = $row;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $build[&#39;table_data&#39;] = [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;#type&#39; =&amp;gt; &#39;table&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;#header&#39; =&amp;gt; $header,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;#rows&#39; =&amp;gt; $rows,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Finally add the pager.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $build[&#39;pager&#39;] = array(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;#type&#39; =&amp;gt; &#39;pager&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; );&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return $build;&lt;br /&gt;
&amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/4193370844389169591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/07/theme-table-with-pager-drupal-8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/4193370844389169591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/4193370844389169591'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/07/theme-table-with-pager-drupal-8.html' title='Theme table with pager - Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-1602125754687117086</id><published>2019-07-29T03:25:00.001-07:00</published><updated>2019-07-29T03:25:50.753-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Docksal usage with Drupal</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
DOCKSAL&lt;br /&gt;
=======&lt;br /&gt;
&lt;br /&gt;
1. Drupal installation using composer&lt;br /&gt;
&lt;br /&gt;
ref: https://blog.docksal.io/creating-drupal-8-project-from-scratch-using-pre-installed-composer-in-docksal-cli-bfe49b0042e2&lt;br /&gt;
&lt;br /&gt;
# Create new directory for the project&lt;br /&gt;
mkdir my-new-project&lt;br /&gt;
# Go to my new dir&lt;br /&gt;
cd my-new-project&lt;br /&gt;
# Download Drupal 8 using composer repo recommended in Drupal docs&lt;br /&gt;
fin run-cli composer create-project drupal-composer/drupal-project:8.x-dev . --stability dev --no-interaction&lt;br /&gt;
# Initialize Docksal project root&lt;br /&gt;
mkdir .docksal&lt;br /&gt;
# Configure DOCROOT to match checked out files&lt;br /&gt;
fin config set DOCROOT=web&lt;br /&gt;
# Start my project containers&lt;br /&gt;
fin project start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. To start existing project on Docksal&lt;br /&gt;
&amp;nbsp; fin project start / fin up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. DB settings (default)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;db name: default&lt;br /&gt;
&amp;nbsp; &amp;nbsp;username: user&lt;br /&gt;
&amp;nbsp; &amp;nbsp;password: user&lt;br /&gt;
&amp;nbsp; &amp;nbsp;host: db&lt;br /&gt;
&lt;br /&gt;
4. Install PHPMyAdmin to project&lt;br /&gt;
&amp;nbsp; fin addon install pma&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; # Then access it like http://pma.project-name.docksal&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; # To install any addon (ref https://docs.docksal.io/fin/addons/)&lt;br /&gt;
&amp;nbsp; fin addon install &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Removing addon from project&lt;br /&gt;
&amp;nbsp; fin addon remove &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. Drush usage&lt;br /&gt;
&amp;nbsp; # Goto project directory&lt;br /&gt;
&amp;nbsp; # Then start project&lt;br /&gt;
&amp;nbsp; fin up / fin project start&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; # Execute drush commands&lt;br /&gt;
&amp;nbsp; fin drush status&lt;br /&gt;
&lt;br /&gt;
7. Project alias&lt;br /&gt;
&amp;nbsp; # Goto project directory&lt;br /&gt;
&amp;nbsp; cd /var/demo&lt;br /&gt;
&amp;nbsp; fin up&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; # Now can execute commands from anywhere using project alaias&lt;br /&gt;
&amp;nbsp; # here alaias is @demo (its created automatically with project name)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; fin @demo drush status&lt;br /&gt;
&lt;br /&gt;
8. Using Composer commands&lt;br /&gt;
&amp;nbsp; fin composer require drupal/admin_toolbar&lt;br /&gt;
&lt;br /&gt;
9. Check logs&lt;br /&gt;
&amp;nbsp; fin logs -f&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/1602125754687117086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/07/docksal-usage-with-drupal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1602125754687117086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1602125754687117086'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/07/docksal-usage-with-drupal.html' title='Docksal usage with Drupal'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-636608279192671105</id><published>2019-07-29T02:45:00.000-07:00</published><updated>2019-07-29T03:25:35.919-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Enable error reporting in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Add this code in the settings.php&lt;br /&gt;
&lt;br /&gt;
$config[&#39;system.logging&#39;][&#39;error_level&#39;] = &#39;verbose&#39;;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/636608279192671105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/07/enable-error-reporting-in-drupal-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/636608279192671105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/636608279192671105'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/07/enable-error-reporting-in-drupal-8.html' title='Enable error reporting in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-1246752715174423431</id><published>2019-07-08T19:27:00.001-07:00</published><updated>2022-01-19T08:59:29.655-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Magento 2"/><title type='text'>Deploy Magento 2 application to another server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Take the database backup.&lt;/li&gt;
&lt;li&gt;Import the database to the new server.&lt;/li&gt;
&lt;li&gt;Change base URL in the imported database.&lt;br /&gt;&lt;br /&gt;
In table core_config_data&lt;br /&gt;In Path column: web/unsecure/base_url, web/secure/base_url&lt;/li&gt;
&lt;li&gt;Run the following commands:&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;bin/magento setup:di:compile&lt;/li&gt;
&lt;li&gt;bin/magento setup:static-content:deploy -f&lt;/li&gt;
&lt;li&gt;bin/magento cache:flush&lt;/li&gt;
&lt;li&gt;sudo chmod -R 777 var/&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/1246752715174423431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/07/deploy-magento-2-application-to-another.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1246752715174423431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1246752715174423431'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/07/deploy-magento-2-application-to-another.html' title='Deploy Magento 2 application to another server'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-1548582115478596118</id><published>2019-04-15T01:27:00.002-07:00</published><updated>2019-04-15T01:27:25.382-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><category scheme="http://www.blogger.com/atom/ns#" term="SMTP"/><title type='text'>SMTP configuration for Gmail | Drupal 8 [Updated]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Use the following configuration&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWXq72I7LjgOf6RuEtStuRlOkl5LQyCY1oz3W_r0i4bgz3Q05EFwagd-5dwajqBaP585DfB4pdAnGBRNLOFkd1zmNkmTRbsGLR3hJs8K221XeqYrJ6ArrMxnHqI9dnm9hoz6lKF9UM824/s1600/SMTP+Authentication+Support+++WaktuIn.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;557&quot; data-original-width=&quot;1228&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWXq72I7LjgOf6RuEtStuRlOkl5LQyCY1oz3W_r0i4bgz3Q05EFwagd-5dwajqBaP585DfB4pdAnGBRNLOFkd1zmNkmTRbsGLR3hJs8K221XeqYrJ6ArrMxnHqI9dnm9hoz6lKF9UM824/s640/SMTP+Authentication+Support+++WaktuIn.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/1548582115478596118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/04/smtp-configuration-for-gmail-drupal-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1548582115478596118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1548582115478596118'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/04/smtp-configuration-for-gmail-drupal-8.html' title='SMTP configuration for Gmail | Drupal 8 [Updated]'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWXq72I7LjgOf6RuEtStuRlOkl5LQyCY1oz3W_r0i4bgz3Q05EFwagd-5dwajqBaP585DfB4pdAnGBRNLOFkd1zmNkmTRbsGLR3hJs8K221XeqYrJ6ArrMxnHqI9dnm9hoz6lKF9UM824/s72-c/SMTP+Authentication+Support+++WaktuIn.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-2600538847348401326</id><published>2019-04-04T22:27:00.001-07:00</published><updated>2019-04-04T22:27:45.470-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Drupal 8 Ajax Throbber CSS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;.ajax-progress,
.ajax-progress-throbber,
.ajax-progress-fullscreen {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-border-radius: 0;
  border-radius: 0;
  opacity: 1;
  background: rgba(255, 255, 255, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  overflow: hidden;
  text-indent: -99999em;
}
 
.ajax-progress-throbber:before,
.ajax-progress-fullscreen:before {
  content: &quot; &quot;;
  display: block;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 0.8s infinite linear;
  animation: spin 0.8s infinite linear;
  border-radius: 120px;
  border-width: 10px;
  border-style: solid;
  border-color: #D6232F transparent #D6232F transparent;
  overflow: hidden;
  text-indent: -99999em;
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
 
@-webkit-keyframes spin {
  to {
    transform: rotate(360deg); 
  }
}
 
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/2600538847348401326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/04/drupal-8-ajax-throbber-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2600538847348401326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2600538847348401326'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/04/drupal-8-ajax-throbber-css.html' title='Drupal 8 Ajax Throbber CSS'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-2024718982830480050</id><published>2019-03-29T22:55:00.000-07:00</published><updated>2019-03-29T22:59:31.014-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CURL"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><category scheme="http://www.blogger.com/atom/ns#" term="HTTPClient request"/><title type='text'>Increase the Guzzle HTTP Client request timeout in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Some times HTTP Requests took more than 30 ms execution time that end up with exceptions like :&lt;br /&gt;
&lt;h2&gt;&lt;pre class=&quot;prettyprint&quot;&gt;Error message: cURL error 28: Operation timed out after 29992 &lt;/pre&gt;&lt;/h2&gt;&lt;br /&gt;
The solution is very simple, use the following lines in the settings.php&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;prettyprint&quot;&gt;/**
 * HTTP Client config.
 */
$settings[&#39;http_client_config&#39;][&#39;timeout&#39;] = 60;

&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/2024718982830480050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/03/increase-guzzle-http-client-request.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2024718982830480050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2024718982830480050'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/03/increase-guzzle-http-client-request.html' title='Increase the Guzzle HTTP Client request timeout in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-1604513607825638377</id><published>2019-02-11T22:22:00.001-08:00</published><updated>2019-02-11T22:22:23.635-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>To get route name from URL in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;
$url_object = \Drupal::service(&#39;path.validator&#39;)-&amp;gt;getUrlIfValid(&#39;admin/content&#39;);

$route_name = $url_object-&amp;gt;getRouteName();

dpm($route_name);

&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/1604513607825638377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2019/02/to-get-route-name-from-url-in-drupal-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1604513607825638377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1604513607825638377'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2019/02/to-get-route-name-from-url-in-drupal-8.html' title='To get route name from URL in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-9115967009007510847</id><published>2018-06-27T06:37:00.001-07:00</published><updated>2018-06-27T06:37:18.886-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>ResourceResponse storing response data in cache In Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;While create REST resource in Drupal 8, ResourceResponse method used to return response. But it cache the response data.&lt;br /&gt;
&lt;br /&gt;
If you don&#39;t want to store response in cache, use this code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$build = [
      &#39;#cache&#39; =&gt; [
        &#39;max-age&#39; =&gt; 0,
      ],
    ];
    return (new ResourceResponse($response, $response_code))-&gt;addCacheableDependency($build);
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/9115967009007510847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2018/06/resourceresponse-storing-response-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/9115967009007510847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/9115967009007510847'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2018/06/resourceresponse-storing-response-data.html' title='ResourceResponse storing response data in cache In Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-6242857506834208798</id><published>2018-05-28T06:35:00.002-07:00</published><updated>2018-06-27T06:29:38.921-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Add JOIN tables in views query alter in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
How to add join condition in views programmatically in Drupal 8?&lt;/h3&gt;
&lt;div&gt;
use $query-&amp;gt;queueTable to implement joins.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;function hook_views_query_alterViewExecutable $views, QueryPluginBase $query) {
  $query-&amp;gt;queueTable(&#39;node__field_accounts&#39;, &quot;node_field_data&quot;, NULL, &#39;node__field_accounts&#39;);
  $query-&amp;gt;addWhere($where_last_key, &#39;node__field_accounts.field_accounts_target_id&#39;, 
$account_values[&#39;target_id&#39;], &#39;IN&#39;);
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Method definition&lt;/u&gt;&lt;br /&gt;
&lt;strong&gt;&lt;i&gt;Sql::queueTable($table, $relationship = NULL, JoinPluginBase $join = NULL, $alias = NULL)&lt;/i&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;To use INNER JOIN&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$configuration = [
      &#39;type&#39; =&amp;gt; &#39;INNER&#39;,
      &#39;table&#39; =&amp;gt; &#39;user__field_region&#39;,
      &#39;field&#39; =&amp;gt; &#39;entity_id&#39;,
      &#39;left_table&#39; =&amp;gt; &#39;users_field_data&#39;,
      &#39;left_field&#39; =&amp;gt; &#39;uid&#39;,
      &#39;operator&#39; =&amp;gt; &#39;=&#39;,
    ];
    $join = Views::pluginManager(&#39;join&#39;)
      -&amp;gt;createInstance(&#39;standard&#39;, $configuration);
    $query-&amp;gt;queueTable(&#39;user__field_region&#39;, &#39;users_field_data&#39;, $join , &#39;user__field_region&#39;);
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/6242857506834208798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2018/05/add-join-tables-in-views-query-alter-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/6242857506834208798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/6242857506834208798'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2018/05/add-join-tables-in-views-query-alter-in.html' title='Add JOIN tables in views query alter in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-8723629413872453146</id><published>2018-05-28T06:29:00.000-07:00</published><updated>2018-05-28T06:29:14.437-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Display raw SQL query of views programmatically in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
How to display raw sql query of a&amp;nbsp; views in Drupal 8?&lt;br /&gt;
&lt;br /&gt;
To see views SQL query, you can use hook_views_pre_execute(ViewExecutable $view)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;function hook_views_pre_execute(ViewExecutable $view) {
  print_r($view-&amp;gt;query-&amp;gt;query()-&amp;gt;__toString()); die();
}
&lt;/pre&gt;
&lt;br /&gt;
Use &lt;b&gt;__toString()&lt;/b&gt; with query to return raw SQL query.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/8723629413872453146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2018/05/display-raw-sql-query-of-views.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8723629413872453146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8723629413872453146'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2018/05/display-raw-sql-query-of-views.html' title='Display raw SQL query of views programmatically in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-1242161152185864222</id><published>2018-05-01T01:22:00.002-07:00</published><updated>2018-05-01T02:11:21.027-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dependency Injection"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>How to inject database connection in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Database connection can be injected in class object using dependency injection.&lt;br /&gt;
&lt;br /&gt;
We can also use service method&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;\Drupal::database() 
&lt;/pre&gt;&lt;br /&gt;
This way of using database is suitable for XXX.module file but in class we can use dependency injection.&lt;br /&gt;
&lt;br /&gt;
Using dependency injection :-&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Drupal\Core\Database\Connection&lt;/i&gt; class for database connection.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;use Drupal\Core\Database\Connection;
use Symfony\Component\DependencyInjection\ContainerInterface;

class CustomClass {

  /**
   * The database connection to be used.
   *
   * @var \Drupal\Core\Database\Connection
   */
  protected $database;

  /**
   * @param \Drupal\Core\Database\Connection $database
   *   The database connection to be used.
   */
  public function __construct(Connection $database) {
    $this-&gt;database = $database;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    $container-&gt;get(&#39;database&#39;)
  }

}
&lt;/pre&gt;&lt;br /&gt;
&lt;i&gt;$container-&gt;get(&#39;database&#39;)&lt;/i&gt; here database is the service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;How to use it&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
For insert query :-&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$query = $this-&gt;database-&gt;insert(&#39;custom_table&#39;)
        -&gt;fields([&#39;id&#39;, &#39;message&#39;])
        -&gt;values([1, &#39;some text&#39;]);
$result = $query-&gt;execute();
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
For checking table exists :- &lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$database_schema = $this-&gt;database-&gt;schema();
if (!($database_schema-&gt;tableExists(&#39;custom_table&#39;))) {
  return FALSE;
} 
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/1242161152185864222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2018/05/how-to-inject-database-connection-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1242161152185864222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/1242161152185864222'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2018/05/how-to-inject-database-connection-in.html' title='How to inject database connection in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-381819057279639559</id><published>2017-11-18T00:59:00.003-08:00</published><updated>2017-11-18T00:59:38.735-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to call non-static method from static method of same class?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;You must create a new object inside the static method to access not-static methods inside that class:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Foo&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; fun1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        echo &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;non-static&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;   
    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; fun2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        echo &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fun1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;Reference:&amp;nbsp;&lt;a href=&quot;https://stackoverflow.com/questions/41631623/how-to-call-non-static-method-from-static-method-of-same-class&quot; target=&quot;_blank&quot;&gt;https://stackoverflow.com/questions/41631623/how-to-call-non-static-method-from-static-method-of-same-class&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/381819057279639559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-call-non-static-method-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/381819057279639559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/381819057279639559'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-call-non-static-method-from.html' title='How to call non-static method from static method of same class?'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-2605018296976644143</id><published>2017-11-13T23:06:00.001-08:00</published><updated>2017-11-13T23:09:56.761-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>How to get field settings in Drupal 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;To get settings of an Entity field in Drupal 8&lt;br /&gt;
&lt;br /&gt;
Use this code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$entity_type=&#39;node&#39;;
$bundle=&#39;article&#39;;
$field_name=&#39;field_summary_image&#39;;
$bundle_fields = \Drupal::getContainer()-&amp;gt;get(&#39;entity_field.manager&#39;)-&amp;gt;getFieldDefinitions($entity_type, $bundle);
$field_definition = $bundle_fields[$field_name];
$file_directory= $field_definition-&amp;gt;getSetting(&#39;file_directory&#39;);
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/2605018296976644143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-get-field-settings-in-drupal-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2605018296976644143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2605018296976644143'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-get-field-settings-in-drupal-8.html' title='How to get field settings in Drupal 8'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-8212258796973112941</id><published>2017-11-10T05:47:00.000-08:00</published><updated>2017-11-10T05:47:26.529-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>How to run jQuery code before Drupal ajax submit call</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To run some jQuery code before the Ajax button submit use beforeSubmit function&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Drupal&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;behaviors&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;exampleModule &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  attach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; settings&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// ELEMENT_ID must not include the #&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Drupal&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ajax&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;ELEMENT_ID&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;beforeSubmit &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;form_values&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; element_settings&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// code here&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;};&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/8212258796973112941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-run-jquery-code-before-drupal.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8212258796973112941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8212258796973112941'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/11/how-to-run-jquery-code-before-drupal.html' title='How to run jQuery code before Drupal ajax submit call'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-7053226951443184793</id><published>2017-10-15T23:49:00.001-07:00</published><updated>2017-10-15T23:52:08.795-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Drupal 8.4 requires jQuery 3, which no longer supports load()</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You might get this error&lt;br /&gt;
&lt;span style=&quot;background-color: #eeeeee;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: #eeeeee;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;Uncaught TypeError: a.indexOf is not a function&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;at r.fn.init.r.fn.load (jquery.min.js?v=3.2.1:4)&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;at Object.attach (scripts.js?v=8.4.0:1)&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;at Object.Drupal.attachBehaviors (drupal.js?v=8.4.0:25)&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;at drupal.init.js?v=8.4.0:16&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;at HTMLDocument.t (ready.min.js?v=1.0.8:4)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #eeeeee;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;background-color: #eeeeee;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 13px;&quot;&gt;Drupal 8.4&amp;nbsp; is using latest jQuery version 3.2 which does not support &lt;b&gt;load() &lt;/b&gt;function.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 13px;&quot;&gt;Instead of using &lt;b&gt;&lt;i&gt;load()&lt;/i&gt;&lt;/b&gt;, you can use &lt;b&gt;&lt;i&gt;.on(load,function(){})&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, &amp;quot;Bitstream Vera Sans&amp;quot;, Verdana, Arial, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1.385em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;$(window).on(&#39;load&#39;, function () {
});
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/7053226951443184793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/10/drupal-84-requires-jquery-3-which-no.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7053226951443184793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7053226951443184793'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/10/drupal-84-requires-jquery-3-which-no.html' title='Drupal 8.4 requires jQuery 3, which no longer supports load()'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-2329160285303177287</id><published>2017-10-12T06:14:00.002-07:00</published><updated>2017-10-12T06:14:20.970-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>Feeds import - Skip importing item based on some condition</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;You can do this using &lt;b&gt;&lt;i&gt;hook_feeds_presave&lt;/i&gt;&lt;/b&gt; to check the data prior to it being saved.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242729; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;$item&amp;nbsp;&lt;/i&gt;&amp;nbsp;parameter contains the current feed.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;Check item on some condition.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242729; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;To skip an item to being import, use &lt;b&gt;&lt;i&gt;$entity-&amp;gt;feeds_item-&amp;gt;skip = TRUE;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; mymodule_feeds_presave&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;FeedsSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $source&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $entity&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $item&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

  &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// check that this is fired only for the importer being used&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$source&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;importer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;my_custom_feeds_importer&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;mfgcode&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;18&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      $entity&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;feeds_item&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skip &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; TRUE&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      drupal_set_message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Skipping item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;warning&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/2329160285303177287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/10/feeds-import-skip-importing-item-based.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2329160285303177287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/2329160285303177287'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/10/feeds-import-skip-importing-item-based.html' title='Feeds import - Skip importing item based on some condition'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-7806177654998557061</id><published>2017-09-28T04:04:00.002-07:00</published><updated>2017-09-28T04:06:28.223-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>Create batch process on form submit in Drupal 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Using Drupal batch API we can create batch processes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;// form submit.
function product_display_submit($form, &amp;amp;$form_state) {

  $products = $form_state[&#39;input&#39;][&#39;product_table&#39;];

  if (!empty($products)) {
    // Remove empty values.
    $emptyRemoved = remove_empty($products);
    // re-index array.
    $myarray = array_values($emptyRemoved);


    $progress = 0; // where to start
    $max = count($myarray); // how many records to process until stop.

    // Tell Drupal about the batch process.
    $batch = array(
      &#39;operations&#39; =&amp;gt; array(),
      &#39;finished&#39; =&amp;gt; &#39;product_display_batch_finished&#39;, // runs after batch is finished
      &#39;title&#39; =&amp;gt; t(&#39;Deleting products&#39;),
      &#39;init_message&#39; =&amp;gt; t(&#39;Beginning product delete&#39;),
      &#39;progress_message&#39; =&amp;gt; t(&#39;Deleted @current out of @total&#39;),
      &#39;error_message&#39; =&amp;gt; t(&#39;Product deletion failed.&#39;),
    );

    // set batch operation.
    $batch[&#39;operations&#39;][] = array(&#39;product_display_delete_process&#39;, array($progress, $max, $myarray));
    batch_set($batch);
  }

}

function product_display_delete_process($progress, $max, $products, &amp;amp;$context) {

  for ($i=$progress; $i &amp;lt; $max; $i++) {
    // Update our progress information.
    $context[&#39;message&#39;] = t(&#39;Now processing product id #%product_id&#39;, array(&#39;%product_id&#39; =&amp;gt; $products[$i]));

      // $result = commerce_product_delete_multiple($products);
      $result = commerce_product_delete($products[$i]);

      // Delete product display.
      $query = new EntityFieldQuery;

      $query-&amp;gt;entityCondition(&#39;entity_type&#39;, &#39;node&#39;, &#39;=&#39;)
      -&amp;gt;propertyCondition(&#39;type&#39;, &#39;product_display&#39;)
      -&amp;gt;fieldCondition(&#39;field_product&#39;, &#39;product_id&#39;, $products[$i], &#39;=&#39;)
      -&amp;gt;range(0, 1);
      $result = $query-&amp;gt;execute();

      if (!empty($result[&#39;node&#39;])) {
        // Delete Product Display node.
        foreach ($result[&#39;node&#39;] as $nid =&amp;gt; $val) break;
        try {
          node_delete($nid);

          // Delete alias.
          $path = path_load(
            array(&#39;source&#39; =&amp;gt; &#39;node/&#39; . $key)
          );

          path_delete($path[&#39;pid&#39;]);
        }
        catch (Exception $e) {
          drupal_set_message(&#39;Error occurred. Check logs.&#39;);
        }
      }
  }

}

function product_display_batch_finished($success, $results, $operations) {
  if ($success) {
    drupal_set_message(&#39;Product deletion is complete&#39;);
  }
  else {
    $error_operation = reset($operations);
    watchdog(&#39;products_batchprocess_error&#39;,t(&#39;An error occurred while processing @operation with arguments : @args&#39;, array(&#39;@operation&#39; =&amp;gt; $error_operation[0], &#39;@args&#39; =&amp;gt; print_r($error_operation[0], TRUE))));
    $message = t(&#39;An error occurred while processing %error_operation with arguments: @arguments&#39;, array(
      &#39;%error_operation&#39; =&amp;gt; $error_operation[0],
      &#39;@arguments&#39; =&amp;gt; print_r($error_operation[1], TRUE)
    ));
    drupal_set_message($message, &#39;error&#39;);
  }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;a href=&quot;https://www.drupal.org/docs/7/api/batch-api/overview&quot; target=&quot;_blank&quot;&gt;https://www.drupal.org/docs/7/api/batch-api/overview&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://hardcoredev.com/blog/using-batch-api-in-drupal-7-tutorial-in-simple-code/&quot; target=&quot;_blank&quot;&gt;http://hardcoredev.com/blog/using-batch-api-in-drupal-7-tutorial-in-simple-code/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://rootid.in/think/least-you-need-know-drupal-batch-api-or-how-use-drupal-progress-bar&quot; target=&quot;_blank&quot;&gt;https://rootid.in/think/least-you-need-know-drupal-batch-api-or-how-use-drupal-progress-bar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/7806177654998557061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/09/create-batch-process-on-form-submit-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7806177654998557061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7806177654998557061'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/09/create-batch-process-on-form-submit-in.html' title='Create batch process on form submit in Drupal 7'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-8644155920531447836</id><published>2017-09-28T03:55:00.001-07:00</published><updated>2017-09-28T04:06:42.157-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>How to create custom rules condition in Drupal 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;font-style: italic;&quot;&gt;hook_rules_condition_info() &lt;/b&gt;is used to create custom rules conditions.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;/**
 * Implements hook_rules_condition_info()
 */
function custom_rules_rules_condition_info() {
  return array(

    &#39;custom_rules_default_condition_dealer_store&#39; =&amp;gt; array(
      &#39;label&#39; =&amp;gt; t(&#39;Dealer store&#39;),
      &#39;group&#39; =&amp;gt; t(&#39;Domains&#39;),
      &#39;parameter&#39; =&amp;gt; array(
        &#39;operator&#39; =&amp;gt; array(
          &#39;type&#39; =&amp;gt; &#39;text&#39;,
          &#39;label&#39; =&amp;gt; t(&#39;Show pricing enabled&#39;),
          &#39;options list&#39; =&amp;gt; &#39;__custom_rules_dealer_store_operators&#39;,
          &#39;default value&#39; =&amp;gt; &#39;0&#39;
        )
      )
    ),
  );
}

/**
 * Custom hook
 * Test domain for matching
 * @param string $operator
 * @return bool
 */
function custom_rules_default_condition_dealer_store($operator) {

  $domain_info = domain_get_domain();
  // returns 0 or 1.
  // 1 means current domain is dealer store.
  // 0 means current domain is portal store.
  $show_pricing = domain_conf_variable_get($domain_info[&#39;domain_id&#39;], &#39;show_pricing&#39;);

  switch ($operator) {
    case &#39;1&#39;:
      return ($show_pricing == 1)?TRUE:FALSE;
    case &#39;0&#39;: default:
      return ($show_pricing == 0)?TRUE:FALSE;
  }
}

/**
 * Get array comparsion operators
 * @return array
 */
function __custom_rules_dealer_store_operators() {
  return array(
    &#39;1&#39;     =&amp;gt; t(&#39;Yes&#39;),
    &#39;0&#39;     =&amp;gt; t(&#39;No&#39;),
  );
}


&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/8644155920531447836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/09/how-to-create-custom-rules-condition-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8644155920531447836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/8644155920531447836'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/09/how-to-create-custom-rules-condition-in.html' title='How to create custom rules condition in Drupal 7'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8245480087941986974.post-7813027851961316506</id><published>2017-09-06T00:10:00.005-07:00</published><updated>2017-09-06T00:10:49.940-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><title type='text'>Mapping of XML feeds conditionally using Feed Importer In Drupal 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Map XML feeds on some basic conditions without using feeds tamper module&lt;br /&gt;
&lt;br /&gt;
First, take a look at an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;images&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;image type=&quot;file&quot;&amp;gt;https://s3.amazon.com/example1.pdf&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;image type=&quot;file&quot;&amp;gt;https://s3.amazon.com/example3.pdf&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;image type=&quot;file&quot;&amp;gt;https://s3.amazon.com/example2.pdf&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;image type=&quot;image&quot;&amp;gt;https://s3.amazon.com/example.jpg&amp;lt;/image&amp;gt;&lt;br /&gt;
&amp;lt;/images&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Case 1&lt;/u&gt;: If you want to import only those feeds that has type &quot;image&quot; then your XML Parser settings should be like&lt;b&gt;&lt;i&gt; Images/Image[./@type = &#39;image&#39;]&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;u&gt;Case 2&lt;/u&gt;: Import feeds that has not file type then Images/Image[./@type != &#39;file&#39;]&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Example 2: &lt;/u&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;codeblock language-php&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 0.25em; border: none; box-sizing: border-box; color: #4e4e4e; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em; padding: 0.25em 0.75em; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot; language-php&quot; style=&quot;background: none; border: 0px; box-sizing: border-box; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 0.92308em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;item&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;enclosure&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;http://www.example.com/path-to-image/image1.jpg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;image/jpeg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;enclosure&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;http://www.example.com/path-to-image/image2.jpg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;image/jpeg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;enclosure&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;http://www.example.com/path-to-image/image3.jpg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot; style=&quot;border: 0px; box-sizing: border-box; color: #308217; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot; style=&quot;border: 0px; box-sizing: border-box; color: #0678be; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;image/jpeg&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Demo title &lt;span class=&quot;token number&quot; style=&quot;border: 0px; box-sizing: border-box; color: #707070; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token markup&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; color: #9e5c00; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token tag&quot; style=&quot;border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;/span&gt;item&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &amp;quot;lucida grande&amp;quot; , &amp;quot;dejavu sans&amp;quot; , &amp;quot;bitstream vera sans&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;Under XPath XML parser settings we have this set as an query to retrieve those images&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;codeblock language-php&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 0.25em; border: none; box-sizing: border-box; color: #4e4e4e; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 13px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em; padding: 0.25em 0.75em; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot; language-php&quot; style=&quot;background: none; border: 0px; box-sizing: border-box; font-family: Monaco, Consolas, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 0.92308em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;field_feed_image&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt; enclosure&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot; style=&quot;border: 0px; box-sizing: border-box; color: #707070; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;@url
field_feed_image&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt; enclosure&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot; style=&quot;border: 0px; box-sizing: border-box; color: #707070; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;@url
field_feed_image&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt; enclosure&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot; style=&quot;border: 0px; box-sizing: border-box; color: #707070; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot; style=&quot;border: 0px; box-sizing: border-box; color: #555555; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;@url&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u style=&quot;font-style: italic;&quot;&gt;Reference Site:&lt;/u&gt;&amp;nbsp;&lt;a href=&quot;https://www.drupal.org/node/1108220&quot; target=&quot;_blank&quot;&gt;https://www.drupal.org/node/1108220&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://keviv03.blogspot.com/feeds/7813027851961316506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://keviv03.blogspot.com/2017/09/mapping-of-xml-feeds-conditionally.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7813027851961316506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8245480087941986974/posts/default/7813027851961316506'/><link rel='alternate' type='text/html' href='http://keviv03.blogspot.com/2017/09/mapping-of-xml-feeds-conditionally.html' title='Mapping of XML feeds conditionally using Feed Importer In Drupal 7'/><author><name>Vivek Kumar</name><uri>http://www.blogger.com/profile/06074040304306301850</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>