So you made some mistake with your previous commit but dont want to make hundreds of commits and want to have nice looking reflog. You can do some rebasing with this command
So you made some mistake with your previous commit but dont want to make hundreds of commits and want to have nice looking reflog. You can do some rebasing with this command
As title says drupal console fails if drupal/web has an empty composer.json file. As default drupal provides one for you, this might break stuff for you so watch out for this.
Usually people will just create one key with just default command
ssh-keygen
get a public/private pair in (/Users/my_user/.ssh/id_rsa) and use that for anything, but there is much more to this then that. You can create many keys and use them for separate accounts and also automate that.
For example
Some explanation why it is better to use
$node = \Drupal::entityManager()->getStorage('node')->load($nid);
than
$node = Node::load($nid);
Assume we have a $node object and it has some reference field, we get to that field with
$node->get($field)->referencedEntities();
where we get array of entites we can loop now, se lets say this reference field is even paragraph which has another reference field in it which is taxonomy term, we will loop this field like this
So if you are using entity_create to create new entity programmatically you may also want to have some validations, lets say you implemented that some field is unique and you don't want it to have more then one of the same value and you set that up with ->addConstraint('UniqueField')
In D7 we used drupal_http_request . to retrieve remote data from other sites and then manipulated in in drupal, well there is no more of that function, we are using HTTP Guzzle from Symfony in drupal8 https://www.drupal.org/node/1862446
Coding a cron job in drupal 8 is pretty easy. All you have to do is go to your module folder, open .module file and add hook_cron function, so lets add some content with our hook_cron
To have integer go to BigInt type you will need to use setSettings in your BaseFieldDefinition for your custom entity, with this you will have space for 19 digits numbers, with unsigned property making this all positive numbers.
Since we already wrote about how to make custom entity(data model) we will want to configure base fields we are adding, first thing you will want is to configure what fields are used for view and form part.