I have successfully added several fields to the product page in the admin panel, but I cannot save the values to use them in the future. What do I need to do?
$form_state->getFormObject()->getEntity() does not work in Drupal 7, similarly to $form_state->setValue() and $form_state->getValue().
What should I add to the code for this to work? How i can save values from this select fields?
I want to get the cache object but i am getting below error. Any help would be appreciated. I have this code in the core\lib\Drupal\Core\Database\Database.php
Code:
\Drupal::cache() ;
Error:
Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer()
Below is my class and i am trying to inject CacheBackendInterface interface in my class but it is not working. any help please?
<?php
namespace Drupal\Core\Database;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use Aws\SecretsManager\SecretsManagerClient;
use Drupal\Core\Cache\BackendChain;
use Drupal\Core\Cache\MemoryBackend;
I have created a page and added views block and listing articles from a specific content type. I added a global: Custom text field and added a link that successfully opens a modal_dialog window with the code below.
<a class="use-ajax button" data-dialog-type="modal" href="node/{{ nid }}">open modal</a>