Return HTML from a Drupal 8 form

Submitted by barnettech on Wed, 02/13/2019 - 15:09

 * @file
 * Contains \Drupal\flippersearch\Form\flippersearch.

namespace Drupal\flippersearch\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

class flippersearch extends FormBase {

   *  {@inheritdoc}
  public function getFormId() {
    return 'flippersearch_form';

   * {@inheritdoc}
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The request object.
  public function buildForm(array $form, FormStateInterface $form_state) {
    // Use the Form API to define form elements.

Getting text / a string from SimpleXMLElement Object

Submitted by barnettech on Sun, 02/10/2019 - 20:05
if (file_exists(drupal_get_path('module', 'complimentmigration') . '/MyManual08-088-18.xml')) {
      $xml = simplexml_load_file(drupal_get_path('module', 'complimentmigration') . '/MyManual08-088-18.xml');
      $xml2 = (string) $xml->section->version->title;
' . print_r($xml2, TRUE) . '



Lua, what is dt, dy, and dx

Submitted by barnettech on Thu, 01/31/2019 - 20:34

number dx
The amount moved along the x-axis since the last time love.mousemoved was called.
number dy
The amount moved along the y-axis since the last time love.mousemoved was called.

dt is the most common shorthand for delta-time, which is usually passed through love.update to represent the amount of time which has passed since it was last called. It is in seconds, but because of the speed of modern processors is usually smaller than 1 values like 0.01 are common.

so the ball will move accordingly every dt